AndrzejL

CMakeLists.txt

Mar 29th, 2012
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.62 KB | None | 0 0
  1.  
  2. # config file
  3. configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/config.hpp.cmake" "${CMAKE_CURRENT_SOURCE_DIR}/config.hpp")
  4.  
  5. # local files
  6. set(GAME
  7. main.cpp
  8. engine.cpp
  9. )
  10. set(GAME_HEADER
  11. engine.hpp
  12. config.hpp
  13. )
  14. source_group(game FILES ${GAME} ${GAME_HEADER})
  15.  
  16. add_openmw_dir (mwrender
  17. renderingmanager debugging sky player animation npcanimation creatureanimation actors objects
  18. renderinginterface localmap water
  19. )
  20.  
  21. add_openmw_dir (mwinput
  22. inputmanager
  23. )
  24.  
  25. add_openmw_dir (mwgui
  26. layouts text_input widgets race class birth review window_manager console dialogue
  27. dialogue_history window_base stats_window messagebox journalwindow charactercreation
  28. )
  29.  
  30. add_openmw_dir (mwdialogue
  31. dialoguemanager journal journalentry quest topic
  32. )
  33.  
  34. add_openmw_dir (mwscript
  35. locals scriptmanager compilercontext interpretercontext cellextensions miscextensions
  36. guiextensions soundextensions skyextensions statsextensions containerextensions
  37. aiextensions controlextensions extensions globalscripts ref dialogueextensions
  38. animationextensions
  39. )
  40.  
  41. add_openmw_dir (mwsound
  42. soundmanager openal_output mpgsnd_decoder ffmpeg_decoder
  43. )
  44.  
  45. add_openmw_dir (mwworld
  46. refdata world physicssystem scene environment globals class action nullaction actionteleport
  47. containerstore actiontalk actiontake manualref player cellfunctors
  48. cells localscripts customdata weather inventorystore ptr
  49. )
  50.  
  51. add_openmw_dir (mwclass
  52. classes activator creature npc weapon armor potion apparatus book clothing container door
  53. ingredient creaturelevlist itemlevlist light lockpick misc probe repair static
  54. )
  55.  
  56. add_openmw_dir (mwmechanics
  57. mechanicsmanager stat creaturestats magiceffects movement
  58. )
  59.  
  60. # Main executable
  61. IF(OGRE_STATIC)
  62. IF(WIN32)
  63. ADD_DEFINITIONS(-DENABLE_PLUGIN_CgProgramManager -DENABLE_PLUGIN_OctreeSceneManager -DENABLE_PLUGIN_ParticleFX -DENABLE_PLUGIN_-DENABLE_PLUGIN_Direct3D9 -DENABLE_PLUGIN_GL)
  64. set(OGRE_STATIC_PLUGINS ${OGRE_Plugin_CgProgramManager_LIBRARIES} ${OGRE_Plugin_OctreeSceneManager_LIBRARIES} ${OGRE_Plugin_ParticleFX_LIBRARIES} ${OGRE_RenderSystem_Direct3D9_LIBRARIES} ${OGRE_RenderSystem_GL_LIBRARIES})
  65. ELSE(WIN32)
  66. ADD_DEFINITIONS(-DENABLE_PLUGIN_CgProgramManager -DENABLE_PLUGIN_OctreeSceneManager -DENABLE_PLUGIN_ParticleFX -DENABLE_PLUGIN_GL)
  67. set(OGRE_STATIC_PLUGINS ${OGRE_Plugin_CgProgramManager_LIBRARIES} ${Cg_LIBRARIES} ${OGRE_Plugin_OctreeSceneManager_LIBRARIES} ${OGRE_Plugin_ParticleFX_LIBRARIES} ${OGRE_RenderSystem_GL_LIBRARIES})
  68. ENDIF(WIN32)
  69. ENDIF(OGRE_STATIC)
  70. add_executable(openmw
  71. ${OPENMW_LIBS} ${OPENMW_LIBS_HEADER}
  72. ${COMPONENT_FILES}
  73. ${OPENMW_FILES}
  74. ${GAME} ${GAME_HEADER}
  75. ${APPLE_BUNDLE_RESOURCES}
  76. )
  77.  
  78. # Sound stuff - here so CMake doesn't stupidly recompile EVERYTHING
  79. # when we change the backend.
  80. include_directories(${SOUND_INPUT_INCLUDES} ${BULLET_INCLUDE_DIRS})
  81. add_definitions(${SOUND_DEFINE})
  82.  
  83. target_link_libraries(openmw
  84. ${OGRE_STATIC_PLUGINS}
  85. ${OIS_LIBRARIES}
  86. ${Boost_LIBRARIES}
  87. ${OPENAL_LIBRARY}
  88. ${SOUND_INPUT_LIBRARY}
  89. ${BULLET_LIBRARIES}
  90. ${MYGUI_LIBRARIES}
  91. ${MYGUI_PLATFORM_LIBRARIES}
  92. ${OGRE_LIBRARIES}
  93. components
  94. )
  95.  
  96. # Fix for not visible pthreads functions for linker with glibc 2.15
  97. if (UNIX AND NOT APPLE)
  98. target_link_libraries(openmw ${CMAKE_THREAD_LIBS_INIT})
  99. endif()
  100.  
  101. if(APPLE)
  102. find_library(CARBON_FRAMEWORK Carbon)
  103. target_link_libraries(openmw ${CARBON_FRAMEWORK})
  104. endif(APPLE)
  105.  
  106. if(DPKG_PROGRAM)
  107. INSTALL(TARGETS openmw RUNTIME DESTINATION games COMPONENT openmw)
  108. endif(DPKG_PROGRAM)
  109. ${OGRE_LIBRARIES}
Advertisement
Add Comment
Please, Sign In to add comment