PLATFORM="sparc-sunos57-static" CURSES_LIBRARY="/usr/lib/libcurses.a" FORM_LIBRARY="/usr/lib/libform.a" CC="cc" CXX="CC" # Write entries into the cache file before building cmake. write_cache() { BINDIR=`pwd` cat > UserMakeRules.cmake <<EOF SET(CMAKE_DL_LIBS "-Bdynamic -ldl -Bstatic") EOF write_standard_cache cat >> CMakeCache.txt <<EOF CMAKE_EXE_LINKER_FLAGS:STRING=-Bstatic CMAKE_USER_MAKE_RULES_OVERRIDE:STRING=${BINDIR}/UserMakeRules.cmake CURSES_LIBRARY:FILEPATH=${CURSES_LIBRARY} FORM_LIBRARY:FILEPATH=${FORM_LIBRARY} EOF }