[2518] | 1 | ADD_SOURCE_FILES( |
---|
[2087] | 2 | CameraManager.cc |
---|
[1505] | 3 | GraphicsEngine.cc |
---|
[2087] | 4 | LevelManager.cc |
---|
[1505] | 5 | Main.cc |
---|
[2171] | 6 | PlayerManager.cc |
---|
[1535] | 7 | Settings.cc |
---|
[1505] | 8 | ) |
---|
| 9 | |
---|
[2518] | 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) |
---|
[2129] | 15 | |
---|
[2518] | 16 | WRITE_SOURCE_FILES(ORXONOX_SRC_FILES) |
---|
| 17 | |
---|
[2509] | 18 | TOLUA(Orxonox ORXONOX_SRC_FILES INPUTFILES gui/GUIManager.h) |
---|
[2087] | 19 | |
---|
[2546] | 20 | # Not using precompiled header files: Avoid dependencies |
---|
| 21 | INCLUDE_DIRECTORIES(pch/nopch) |
---|
| 22 | |
---|
[2588] | 23 | # Enlarge heap size for precompiled header files |
---|
| 24 | ADD_CXX_FLAGS("-Zm200" MSVC) |
---|
| 25 | |
---|
[2518] | 26 | ADD_EXECUTABLE(orxonox ${ORXONOX_SRC_FILES}) |
---|
[2590] | 27 | GET_TARGET_PROPERTY(_exec_loc orxonox LOCATION) |
---|
| 28 | GET_FILENAME_COMPONENT(_exec_name ${_exec_loc} NAME) |
---|
[2599] | 29 | SET(ORXONOX_EXECUTABLE_NAME ${_exec_name} CACHE INTERNAL "") |
---|
[2087] | 30 | |
---|
[1505] | 31 | IF(NETWORKTRAFFIC_TESTING_ENABLED) |
---|
| 32 | |
---|
[2599] | 33 | SET(ORXONOXS_SRC_FILES |
---|
[1505] | 34 | GraphicsEngine.cc |
---|
| 35 | objects/Camera.cc |
---|
[2087] | 36 | CameraManager.cc |
---|
[1505] | 37 | ) |
---|
| 38 | |
---|
[2599] | 39 | ADD_LIBRARY(orxonoxs SHARED ${ORXONOXS_SRC_FILES}) |
---|
[1505] | 40 | ENDIF(NETWORKTRAFFIC_TESTING_ENABLED) |
---|
| 41 | |
---|
| 42 | TARGET_LINK_LIBRARIES( orxonox |
---|
[2509] | 43 | ${OGRE_LIBRARY} |
---|
| 44 | ${CEGUI_LIBRARY} |
---|
| 45 | ${LUA_LIBRARIES} |
---|
| 46 | #${CEGUI_SCRIPT_LIBRARIES} |
---|
[1810] | 47 | ceguilua_orxonox |
---|
[2569] | 48 | ogreceguirenderer_orxonox |
---|
[1810] | 49 | tinyxml_orxonox |
---|
| 50 | tolualib_orxonox |
---|
[1505] | 51 | util |
---|
| 52 | core |
---|
[2522] | 53 | #audio |
---|
[1505] | 54 | network |
---|
| 55 | ) |
---|
[2510] | 56 | |
---|
[2590] | 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 | |
---|
[2579] | 73 | IF (NOT WIN32) |
---|
| 74 | INSTALL(TARGETS orxonox RUNTIME DESTINATION bin) |
---|
| 75 | ENDIF (NOT WIN32) |
---|