| 1 | ADD_SOURCE_FILES( |
|---|
| 2 | CameraManager.cc |
|---|
| 3 | GraphicsEngine.cc |
|---|
| 4 | LevelManager.cc |
|---|
| 5 | Main.cc |
|---|
| 6 | PlayerManager.cc |
|---|
| 7 | Settings.cc |
|---|
| 8 | ) |
|---|
| 9 | |
|---|
| 10 | ADD_SOURCE_DIRECTORY(gamestates) |
|---|
| 11 | ADD_SOURCE_DIRECTORY(gui) |
|---|
| 12 | ADD_SOURCE_DIRECTORY(objects) |
|---|
| 13 | ADD_SOURCE_DIRECTORY(overlays) |
|---|
| 14 | ADD_SOURCE_DIRECTORY(tools) |
|---|
| 15 | |
|---|
| 16 | WRITE_SOURCE_FILES(ORXONOX_SRC_FILES) |
|---|
| 17 | |
|---|
| 18 | TOLUA(Orxonox ORXONOX_SRC_FILES INPUTFILES gui/GUIManager.h) |
|---|
| 19 | |
|---|
| 20 | # Not using precompiled header files: Avoid dependencies |
|---|
| 21 | INCLUDE_DIRECTORIES(pch/nopch) |
|---|
| 22 | |
|---|
| 23 | # Enlarge heap size for precompiled header files |
|---|
| 24 | ADD_CXX_FLAGS("-Zm200" MSVC) |
|---|
| 25 | |
|---|
| 26 | ADD_EXECUTABLE(orxonox ${ORXONOX_SRC_FILES}) |
|---|
| 27 | GET_TARGET_PROPERTY(_exec_loc orxonox LOCATION) |
|---|
| 28 | GET_FILENAME_COMPONENT(_exec_name ${_exec_loc} NAME) |
|---|
| 29 | SET(ORXONOX_EXECUTABLE_NAME ${_exec_name} CACHE INTERNAL "") |
|---|
| 30 | |
|---|
| 31 | IF(NETWORKTRAFFIC_TESTING_ENABLED) |
|---|
| 32 | |
|---|
| 33 | SET(ORXONOXS_SRC_FILES |
|---|
| 34 | GraphicsEngine.cc |
|---|
| 35 | objects/Camera.cc |
|---|
| 36 | CameraManager.cc |
|---|
| 37 | ) |
|---|
| 38 | |
|---|
| 39 | ADD_LIBRARY(orxonoxs SHARED ${ORXONOXS_SRC_FILES}) |
|---|
| 40 | ENDIF(NETWORKTRAFFIC_TESTING_ENABLED) |
|---|
| 41 | |
|---|
| 42 | TARGET_LINK_LIBRARIES( orxonox |
|---|
| 43 | ${OGRE_LIBRARY} |
|---|
| 44 | ${CEGUI_LIBRARY} |
|---|
| 45 | ${LUA_LIBRARIES} |
|---|
| 46 | #${CEGUI_SCRIPT_LIBRARIES} |
|---|
| 47 | ceguilua_orxonox |
|---|
| 48 | ogreceguirenderer_orxonox |
|---|
| 49 | tinyxml_orxonox |
|---|
| 50 | tolualib_orxonox |
|---|
| 51 | util |
|---|
| 52 | core |
|---|
| 53 | #audio |
|---|
| 54 | network |
|---|
| 55 | ) |
|---|
| 56 | |
|---|
| 57 | # When using Visual Studio we want to use the output directory as working |
|---|
| 58 | # directory and we also want to specify where the external dlls |
|---|
| 59 | # (lua, ogre, etc.) are. The problem hereby is that these information cannot |
|---|
| 60 | # be specified in CMake because they are not stored in the actual project file. |
|---|
| 61 | # This workaround will create a configured *.vcproj.user file that holds the |
|---|
| 62 | # right values. When starting the solution for the first time, |
|---|
| 63 | # these get written to the *vcproj.yourPCname.yourname.user |
|---|
| 64 | IF(MSVC) |
|---|
| 65 | IF(CMAKE_CL_64) |
|---|
| 66 | SET(MSVC_PLATFORM "x64") |
|---|
| 67 | ELSE(CMAKE_CL_64) |
|---|
| 68 | SET(MSVC_PLATFORM "Win32") |
|---|
| 69 | ENDIF(CMAKE_CL_64) |
|---|
| 70 | CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/orxonox.vcproj.user" "${CMAKE_CURRENT_BINARY_DIR}/orxonox.vcproj.user") |
|---|
| 71 | ENDIF(MSVC) |
|---|
| 72 | |
|---|
| 73 | IF (NOT WIN32) |
|---|
| 74 | INSTALL(TARGETS orxonox RUNTIME DESTINATION bin) |
|---|
| 75 | ENDIF (NOT WIN32) |
|---|