ERR: Fix for building static with -ldl on sun.

This commit is contained in:
Brad King 2003-01-06 15:21:47 -05:00
parent 962bd78f75
commit eb8df4a7d4
1 changed files with 8 additions and 1 deletions

View File

@ -5,9 +5,16 @@ FORM_LIBRARY="/usr/lib/libform.a"
# Write entries into the cache file before building cmake. # Write entries into the cache file before building cmake.
WriteCMakeCache() WriteCMakeCache()
{ {
BINDIR=`pwd`
${CAT} > UserMakeRules.cmake <<EOF
SET(CMAKE_DL_LIBS "")
EOF
${CAT} > CMakeCache.txt <<EOF ${CAT} > CMakeCache.txt <<EOF
BUILD_TESTING:BOOL=OFF BUILD_TESTING:BOOL=OFF
CMAKE_EXE_LINKER_FLAGS:STRING=-static CMAKE_EXE_LINKER_FLAGS:STRING=-Wl,-Bdynamic -ldl -Wl,-Bstatic
CMAKE_USER_MAKE_RULES_OVERRIDE:STRING=${BINDIR}/UserMakeRules.cmake
CMAKE_SKIP_RPATH:BOOL=1 CMAKE_SKIP_RPATH:BOOL=1
CURSES_LIBRARY:FILEPATH=${CURSES_LIBRARY} CURSES_LIBRARY:FILEPATH=${CURSES_LIBRARY}
FORM_LIBRARY:FILEPATH=${FORM_LIBRARY} FORM_LIBRARY:FILEPATH=${FORM_LIBRARY}