- Timestamp:
- 2018-07-06T19:19:28+12:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE/XPDFTOOLS.sh
r32240 r32246 19 19 export LDFLAGS="$LDFLAGS -L$GEXTXPDFTOOLS_INSTALLED/lib" 20 20 21 # For Mac OSX, when -static is passed in for linking, we end up with the error "ld: library not found for -lcrt0.o" 22 # See https://stackoverflow.com/questions/3801011/ld-library-not-found-for-lcrt0-o-on-osx-10-6-with-gcc-clang-static-flag 23 # On Mac OSX, compile it with -Bstatic instead, as per https://stackoverflow.com/questions/844819/how-to-static-link-on-os-x 24 # We will pass in the correct static variant as the custom GSDLFLAG_STATIC, so it will be set to either "-static" (for linux) 25 # or "-Bstatic" for darwin when CMake starts compiling up xpdf-tools. When the GSDLFLAG_STATIC is set, it will also trigger 26 # the branch of the gs-CMakeLists.txt code that does static compiling. If not set, xpdf-tools are compiled against dynamically 27 # linked libraries. 28 if [ "x$GSDLOS" == "xdarwin" ] ; then 29 static_flag=-Bstatic 30 else 31 static_flag=-static 32 fi 21 33 22 34 opt_run_untar $force_untar $auto_untar $package $version … … 72 84 -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ 73 85 -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS" \ 74 -DGSDLFLAG_STATIC_BUILD="true" \86 -DGSDLFLAG_STATIC="$static_flag" \ 75 87 $GEXT_XPDFTOOLS/packages/$package$version 76 88 fi ; \ … … 95 107 # -DPNG_LIBRARY=$prefix/lib/libpng15.a \ 96 108 # -DFREETYPE_LIBRARY=$prefix/lib/libfreetype.a \ 97 # And throw in -DGSDLFLAG_STATIC_BUILD=" true"109 # And throw in -DGSDLFLAG_STATIC_BUILD="-static" for linux or with "-Bstatic" for Macs 98 110 # In place of FREETYPE_LIBRARY, could also try the following (then check built bins 99 111 # by running ldd and file over them): … … 118 130 # -DFREETYPE_LIBRARY=$prefix/lib/libfreetype.so.6.3.20 \ 119 131 # 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, nor121 # set the value to false)132 # pass in -DGSDLFLAG_STATIC_BUILD="..." (remove the line, don't comment it out, nor 133 # set the value to "") 122 134 123 135 # If compilation was successful, then we don't need cmake binaries anymore when
Note:
See TracChangeset
for help on using the changeset viewer.