summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Wachter <bwachter-tmw@lart.info>2009-11-14 03:10:24 +0100
committerJared Adams <jaxad0127@gmail.com>2009-11-13 19:18:22 -0700
commit726dc225fb615b22edeb70880356aa3099e0b472 (patch)
tree6dd8ef77c5433e341bb825462ad62a0ba76284e5
parent4b1aeab2af7467046cd9e411da899ce770bcd780 (diff)
downloadmana-726dc225fb615b22edeb70880356aa3099e0b472.tar.gz
mana-726dc225fb615b22edeb70880356aa3099e0b472.tar.bz2
mana-726dc225fb615b22edeb70880356aa3099e0b472.tar.xz
mana-726dc225fb615b22edeb70880356aa3099e0b472.zip
Added rules required for linking on Solaris
-rw-r--r--src/CMakeLists.txt12
1 files changed, 11 insertions, 1 deletions
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}")