From 726dc225fb615b22edeb70880356aa3099e0b472 Mon Sep 17 00:00:00 2001 From: Bernd Wachter Date: Sat, 14 Nov 2009 03:10:24 +0100 Subject: Added rules required for linking on Solaris --- src/CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b2bc22a8..4b0d75a5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -8,7 +8,7 @@ FIND_PACKAGE(CURL REQUIRED) FIND_PACKAGE(LibXml2 REQUIRED) FIND_PACKAGE(PhysFS REQUIRED) FIND_PACKAGE(PNG REQUIRED) - +FIND_PACKAGE(Gettext REQUIRED) SET(FLAGS "-DPACKAGE_VERSION=\\\"${VERSION}\\\"") SET(FLAGS "${FLAGS} -DPKG_DATADIR=\\\"${PKG_DATADIR}/\\\"") @@ -16,6 +16,9 @@ SET(FLAGS "${FLAGS} -DLOCALEDIR=\\\"${LOCALEDIR}/\\\"") IF (WIN32) SET(EXTRA_LIBRARIES ws2_32 winmm) +ELSEIF (CMAKE_SYSTEM_NAME STREQUAL SunOS) + # explicit linking to libintl is required on Solaris + SET(EXTRA_LIBRARIES intl) ENDIF() SET(GUICHAN_COMPONENTS "SDL") @@ -570,5 +573,12 @@ ENDFOREACH(program) SET(FLAGS_EA "${FLAGS} -DEATHENA_SUPPORT") SET(FLAGS_MANA "${FLAGS} -DMANASERV_SUPPORT") +IF (CMAKE_SYSTEM_NAME STREQUAL SunOS) + # we expect the SMCgtxt package to be present on Solaris; + # the Solaris gettext is not API-compatible to GNU gettext + SET_TARGET_PROPERTIES(mana PROPERTIES LINK_FLAGS "-L/usr/local/lib") + SET_TARGET_PROPERTIES(mana-ea PROPERTIES LINK_FLAGS "-L/usr/local/lib") +ENDIF() + SET_TARGET_PROPERTIES(mana PROPERTIES COMPILE_FLAGS "${FLAGS_MANA}") SET_TARGET_PROPERTIES(mana-ea PROPERTIES COMPILE_FLAGS "${FLAGS_EA}") -- cgit v1.2.3-70-g09d2