Ignore:
Timestamp:
2018-07-05T19:38:36+12:00 (6 years ago)
Author:
ak19
Message:

Rewrote gs-CMakeLists.txt in a tidier way to successfully build working static xpdftools binaries, replacing the previously committed temporary gs-CMakeLists.txt.staticworks file wit its sloppier contents . The changes to gs-CMakeLists.txt now take into account a new variable introduced and set in XPDFTOOLS.sh: GSDLFLAG_STATIC_BUILD. When building statically, set PNG_LIBRARY, ZLIB_LIBRARY, FREETYPE_LIBRARY to their generated .a files and now also set GSDLFLAG_STATIC_BUILD to dummy value true. When wanting to go back to dynamic building for any reason, either don't set any of the LIBRARY packages or set them to their specific real (not symbolical link) generated .so files. In case of dynamic building, additionally do NOT set GSDLFLAG_STATIC_BUILD at all, whether to true or false. Then the gs-CMakeLists.txt follows the internal code branches to use the original code to generate dynamically linked xpdftools binaries.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE/XPDFTOOLS.sh

    r32235 r32237  
    7272        -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
    7373        -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS" \
     74        -DGSDLFLAG_STATIC_BUILD="true" \
    7475        $GEXT_XPDFTOOLS/packages/$package$version
    7576    fi ; \
     
    9495#       -DPNG_LIBRARY=$prefix/lib/libpng15.a \
    9596#       -DFREETYPE_LIBRARY=$prefix/lib/libfreetype.a \
    96 # else, in place of FREETYPE_LIBRARY:
     97# And throw in -DGSDLFLAG_STATIC_BUILD="true"
     98# In place of FREETYPE_LIBRARY, could also try the following (then check built bins
     99# by running ldd and file over them):
    97100##      -DFREETYPE_DIR=$prefix \
     101
    98102
    99103## When -DFREETYPE_DIR is used in place of -DFREETYPE_LIBRARY above, it makes
     
    113117#       -DPNG_LIBRARY=$prefix/lib/libpng15.so.15.30.0 \
    114118#       -DFREETYPE_LIBRARY=$prefix/lib/libfreetype.so.6.3.20 \
    115 
     119# The above is for building dynamic xpdf-tools executables. For which, also don't
     120# pass in -DGSDLFLAG_STATIC_BUILD="true" (remove the line, don't comment it out, nor
     121# set the value to false)
    116122
    117123# If compilation was successful, then we don't need cmake binaries anymore when
Note: See TracChangeset for help on using the changeset viewer.