TickHook: Fix crash when TickHook isn't set.
[gemrb.git] / gemrb / CMakeLists.txt
blobb7fcfefbc083702e73444af5554a5da92a2fadb8
1 ADD_SUBDIRECTORY( core )
2 ADD_SUBDIRECTORY( plugins )
3 ADD_SUBDIRECTORY( override )
4 ADD_SUBDIRECTORY( GUIScripts )
5 ADD_SUBDIRECTORY( docs )
6 ADD_SUBDIRECTORY( tests )
8 ADD_EXECUTABLE(gemrb GemRB.cpp )
9 SET_TARGET_PROPERTIES(gemrb PROPERTIES INSTALL_RPATH ${LIB_DIR})
10 INCLUDE_DIRECTORIES( ${SDL_INCLUDE_DIR} )
11 IF(WIN32)
12  TARGET_LINK_LIBRARIES(gemrb gemrb_core)
13 ELSE(WIN32)
14  IF(APPLE)
15   TARGET_LINK_LIBRARIES(gemrb gemrb_core ${SDL_LIBRARY} ${SDL_MAIN_LIBRARY_PATH} ${COCOA_LIBRARY_PATH} ${DLD_LIBRARY_PATH} ${CMAKE_THREAD_LIBS_INIT})
16  ELSE(APPLE)
17   if (STATIC_LINK)
18         TARGET_LINK_LIBRARIES(gemrb ${DLD_LIBRARY_PATH} ${CMAKE_THREAD_LIBS_INIT}
19                 -Wl,--whole-archive gemrb_core ${plugins} -Wl,--no-whole-archive)
20   else (STATIC_LINK)
21         TARGET_LINK_LIBRARIES(gemrb gemrb_core ${DLD_LIBRARY_PATH} ${CMAKE_THREAD_LIBS_INIT})
22   endif (STATIC_LINK)
23  ENDIF(APPLE)
24 ENDIF(WIN32)
26 # preconfigure the sample config with the selected paths
27 CONFIGURE_FILE(
28   "${CMAKE_CURRENT_SOURCE_DIR}/GemRB.cfg.sample.in"
29   "${CMAKE_CURRENT_BINARY_DIR}/GemRB.cfg.sample"
30   IMMEDIATE @ONLY
33 INSTALL( TARGETS gemrb DESTINATION ${BIN_DIR} )
34 INSTALL( FILES "${CMAKE_CURRENT_BINARY_DIR}/GemRB.cfg.sample" GemRB.cfg.noinstall.sample DESTINATION ${SYSCONF_DIR} )