diff options
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 227302c1..628fab82 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -23,6 +23,12 @@ IF (ENABLE_MANASERV) SET(INTERNAL_LIBRARIES enet) ENDIF() +IF (APPLE) + INCLUDE_DIRECTORIES("../libs/guichan/include") + LINK_DIRECTORIES("../libs/guichan") + SET(INTERNAL_LIBRARIES ${INTERNAL_LIBRARIES} guichan) +ENDIF() + SET(FLAGS "-DPACKAGE_VERSION=\\\"${VERSION}\\\"") SET(FLAGS "${FLAGS} -DPKG_DATADIR=\\\"${PKG_DATADIR}/\\\"") SET(FLAGS "${FLAGS} -DLOCALEDIR=\\\"${LOCALEDIR}/\\\"") @@ -56,7 +62,9 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL SunOS) SET(EXTRA_LIBRARIES intl) ENDIF() -FIND_PACKAGE(Guichan REQUIRED) +IF(NOT APPLE) + FIND_PACKAGE(Guichan REQUIRED) +ENDIF() IF (WITH_OPENGL) FIND_PACKAGE(OpenGL REQUIRED) @@ -620,14 +628,6 @@ IF (WIN32) ) ENDIF (WIN32) -IF (APPLE) - SET(SRCS - ${SRCS} - SDLMain.h - SDLMain.m - ) -ENDIF (APPLE) - SET (PROGRAMS mana) IF (ENABLE_MANASERV) @@ -636,9 +636,9 @@ ELSE(ENABLE_MANASERV) ADD_EXECUTABLE(mana WIN32 ${SRCS} ${SRCS_TMWA}) ENDIF(ENABLE_MANASERV) -TARGET_LINK_LIBRARIES(mana +TARGET_LINK_LIBRARIES(mana PRIVATE ${INTERNAL_LIBRARIES} - ${SDL2_LIBRARIES} + ${SDL2_LINK_LIBRARIES} ${PNG_LIBRARIES} ${PHYSFS_LIBRARY} ${CURL_LIBRARIES} @@ -648,6 +648,10 @@ TARGET_LINK_LIBRARIES(mana ${LIBINTL_LIBRARIES} ${EXTRA_LIBRARIES}) +if(APPLE) + target_link_libraries(mana PRIVATE "-framework Foundation") +endif() + INSTALL(TARGETS mana RUNTIME DESTINATION ${PKG_BINDIR}) IF (CMAKE_SYSTEM_NAME STREQUAL SunOS) |