2010-07-08 20:53:14 +00:00
|
|
|
|
2011-07-08 12:39:23 +00:00
|
|
|
# config file
|
2012-01-28 00:36:17 +00:00
|
|
|
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/config.hpp.cmake" "${CMAKE_CURRENT_SOURCE_DIR}/config.hpp")
|
2011-07-08 12:39:23 +00:00
|
|
|
|
2010-07-08 20:53:14 +00:00
|
|
|
# local files
|
2010-08-03 09:14:57 +00:00
|
|
|
set(GAME
|
2010-07-08 20:53:14 +00:00
|
|
|
main.cpp
|
2011-01-14 18:43:51 +00:00
|
|
|
engine.cpp
|
2012-01-28 00:36:17 +00:00
|
|
|
)
|
2010-08-03 09:14:57 +00:00
|
|
|
set(GAME_HEADER
|
2011-07-08 12:39:23 +00:00
|
|
|
engine.hpp
|
2012-01-28 00:36:17 +00:00
|
|
|
config.hpp
|
|
|
|
)
|
2010-07-08 20:53:14 +00:00
|
|
|
source_group(game FILES ${GAME} ${GAME_HEADER})
|
|
|
|
|
2011-10-22 11:55:06 +00:00
|
|
|
add_openmw_dir (mwrender
|
2013-01-16 22:37:32 +00:00
|
|
|
renderingmanager debugging sky player animation npcanimation creatureanimation activatoranimation
|
|
|
|
actors objects renderinginterface localmap occlusionquery terrain terrainmaterial water shadows
|
2012-09-25 00:35:50 +00:00
|
|
|
compositors characterpreview externalrendering globalmap videoplayer
|
2011-01-08 14:11:37 +00:00
|
|
|
)
|
2010-07-08 20:53:14 +00:00
|
|
|
|
2011-10-29 11:17:04 +00:00
|
|
|
add_openmw_dir (mwinput
|
2012-08-11 15:53:39 +00:00
|
|
|
inputmanagerimp
|
2010-07-08 20:53:14 +00:00
|
|
|
)
|
|
|
|
|
2011-10-29 11:17:04 +00:00
|
|
|
add_openmw_dir (mwgui
|
2012-08-12 16:11:09 +00:00
|
|
|
text_input widgets race class birth review windowmanagerimp console dialogue
|
2012-01-30 17:27:49 +00:00
|
|
|
dialogue_history window_base stats_window messagebox journalwindow charactercreation
|
2013-03-01 17:45:52 +00:00
|
|
|
map_window window_pinnable_base tooltips scrollwindow bookwindow list
|
2012-05-24 13:57:23 +00:00
|
|
|
formatting inventorywindow container hud countdialog tradewindow settingswindow
|
2012-08-26 08:52:06 +00:00
|
|
|
confirmationdialog alchemywindow referenceinterface spellwindow mainmenu quickkeysmenu
|
2012-09-22 22:36:20 +00:00
|
|
|
itemselection spellbuyingwindow loadingscreen levelupdialog waitdialog spellcreationdialog
|
2013-03-01 17:45:52 +00:00
|
|
|
enchantingdialog trainingwindow travelwindow imagebutton exposedwindow cursor
|
2010-07-08 20:53:14 +00:00
|
|
|
)
|
|
|
|
|
2011-10-29 11:17:04 +00:00
|
|
|
add_openmw_dir (mwdialogue
|
2012-11-08 15:49:38 +00:00
|
|
|
dialoguemanagerimp journalimp journalentry quest topic filter selectwrapper
|
2010-08-03 11:17:31 +00:00
|
|
|
)
|
2011-10-29 11:17:04 +00:00
|
|
|
|
|
|
|
add_openmw_dir (mwscript
|
2012-08-08 13:18:55 +00:00
|
|
|
locals scriptmanagerimp compilercontext interpretercontext cellextensions miscextensions
|
2011-10-29 11:17:04 +00:00
|
|
|
guiextensions soundextensions skyextensions statsextensions containerextensions
|
|
|
|
aiextensions controlextensions extensions globalscripts ref dialogueextensions
|
2013-02-03 13:27:27 +00:00
|
|
|
animationextensions transformationextensions consoleextensions userextensions locals
|
2010-08-03 11:17:31 +00:00
|
|
|
)
|
|
|
|
|
2011-10-29 11:17:04 +00:00
|
|
|
add_openmw_dir (mwsound
|
2012-08-09 12:33:21 +00:00
|
|
|
soundmanagerimp openal_output audiere_decoder mpgsnd_decoder ffmpeg_decoder
|
2010-09-30 13:42:28 +00:00
|
|
|
)
|
2011-10-29 11:17:04 +00:00
|
|
|
|
|
|
|
add_openmw_dir (mwworld
|
2012-07-03 10:30:50 +00:00
|
|
|
refdata worldimp physicssystem scene globals class action nullaction actionteleport
|
2012-11-17 17:17:08 +00:00
|
|
|
containerstore actiontalk actiontake manualref player cellfunctors failedaction
|
2012-05-11 14:41:27 +00:00
|
|
|
cells localscripts customdata weather inventorystore ptr actionopen actionread
|
2012-09-13 11:02:26 +00:00
|
|
|
actionequip timestamp actionalchemy cellstore actionapply actioneat
|
2012-11-05 14:09:14 +00:00
|
|
|
esmstore store recordcmp
|
2010-07-26 10:52:32 +00:00
|
|
|
)
|
2010-07-08 20:53:14 +00:00
|
|
|
|
2011-10-29 11:17:04 +00:00
|
|
|
add_openmw_dir (mwclass
|
|
|
|
classes activator creature npc weapon armor potion apparatus book clothing container door
|
|
|
|
ingredient creaturelevlist itemlevlist light lockpick misc probe repair static
|
2010-07-26 09:15:38 +00:00
|
|
|
)
|
2011-10-29 11:17:04 +00:00
|
|
|
|
|
|
|
add_openmw_dir (mwmechanics
|
2013-01-29 07:39:11 +00:00
|
|
|
mechanicsmanagerimp stat character creaturestats magiceffects movement actors activators
|
|
|
|
drawstate spells activespells npcstats aipackage aisequence alchemy aiwander aitravel aifollow
|
2013-02-05 20:45:10 +00:00
|
|
|
aiescort aiactivate
|
2010-07-26 09:15:38 +00:00
|
|
|
)
|
2010-07-08 20:53:14 +00:00
|
|
|
|
2012-04-23 08:57:16 +00:00
|
|
|
add_openmw_dir (mwbase
|
2012-08-11 15:30:55 +00:00
|
|
|
environment world scriptmanager dialoguemanager journal soundmanager mechanicsmanager
|
2012-08-12 16:11:09 +00:00
|
|
|
inputmanager windowmanager
|
2012-04-23 08:57:16 +00:00
|
|
|
)
|
|
|
|
|
2010-07-08 20:53:14 +00:00
|
|
|
# Main executable
|
2013-02-03 12:47:55 +00:00
|
|
|
|
2012-03-15 14:51:39 +00:00
|
|
|
IF(OGRE_STATIC)
|
2013-02-03 12:47:55 +00:00
|
|
|
ADD_DEFINITIONS(-DENABLE_PLUGIN_OctreeSceneManager -DENABLE_PLUGIN_ParticleFX -DENABLE_PLUGIN_GL)
|
|
|
|
set(OGRE_STATIC_PLUGINS ${OGRE_Plugin_OctreeSceneManager_LIBRARIES} ${OGRE_Plugin_ParticleFX_LIBRARIES} ${OGRE_RenderSystem_GL_LIBRARIES})
|
2012-03-15 14:51:39 +00:00
|
|
|
IF(WIN32)
|
2013-02-03 12:47:55 +00:00
|
|
|
ADD_DEFINITIONS(-DENABLE_PLUGIN_Direct3D9)
|
|
|
|
list (APPEND OGRE_STATIC_PLUGINS ${OGRE_RenderSystem_Direct3D9_LIBRARIES})
|
2012-03-15 14:51:39 +00:00
|
|
|
ENDIF(WIN32)
|
2013-02-03 12:47:55 +00:00
|
|
|
IF (Cg_FOUND)
|
|
|
|
ADD_DEFINITIONS(-DENABLE_PLUGIN_CgProgramManager)
|
|
|
|
list (APPEND OGRE_STATIC_PLUGINS ${OGRE_Plugin_CgProgramManager_LIBRARIES} ${Cg_LIBRARIES})
|
|
|
|
ENDIF (Cg_FOUND)
|
2012-03-15 14:51:39 +00:00
|
|
|
ENDIF(OGRE_STATIC)
|
2013-02-03 12:47:55 +00:00
|
|
|
|
2010-07-08 20:53:14 +00:00
|
|
|
add_executable(openmw
|
|
|
|
${OPENMW_LIBS} ${OPENMW_LIBS_HEADER}
|
2011-10-22 11:55:06 +00:00
|
|
|
${OPENMW_FILES}
|
2011-10-29 11:17:04 +00:00
|
|
|
${GAME} ${GAME_HEADER}
|
2010-07-08 20:53:14 +00:00
|
|
|
${APPLE_BUNDLE_RESOURCES}
|
2012-01-28 00:36:17 +00:00
|
|
|
)
|
2011-11-06 08:30:15 +00:00
|
|
|
|
2010-08-13 20:30:22 +00:00
|
|
|
# Sound stuff - here so CMake doesn't stupidly recompile EVERYTHING
|
|
|
|
# when we change the backend.
|
2011-01-30 12:19:41 +00:00
|
|
|
include_directories(${SOUND_INPUT_INCLUDES} ${BULLET_INCLUDE_DIRS})
|
2010-08-13 20:30:22 +00:00
|
|
|
add_definitions(${SOUND_DEFINE})
|
|
|
|
|
2010-07-08 20:53:14 +00:00
|
|
|
target_link_libraries(openmw
|
2012-01-28 00:36:17 +00:00
|
|
|
${OGRE_LIBRARIES}
|
2012-02-28 20:49:45 +00:00
|
|
|
${OGRE_Terrain_LIBRARY}
|
2012-03-19 19:54:30 +00:00
|
|
|
${OGRE_STATIC_PLUGINS}
|
2012-01-28 00:36:17 +00:00
|
|
|
${OIS_LIBRARIES}
|
|
|
|
${Boost_LIBRARIES}
|
|
|
|
${OPENAL_LIBRARY}
|
|
|
|
${SOUND_INPUT_LIBRARY}
|
|
|
|
${BULLET_LIBRARIES}
|
2012-03-18 14:11:37 +00:00
|
|
|
${MYGUI_LIBRARIES}
|
2012-03-26 22:36:53 +00:00
|
|
|
${MYGUI_PLATFORM_LIBRARIES}
|
2012-07-03 20:48:16 +00:00
|
|
|
"shiny"
|
|
|
|
"shiny.OgrePlatform"
|
2012-08-12 18:45:02 +00:00
|
|
|
"oics"
|
2012-07-19 14:23:30 +00:00
|
|
|
components
|
2010-07-08 20:53:14 +00:00
|
|
|
)
|
|
|
|
|
2012-03-21 11:20:19 +00:00
|
|
|
# Fix for not visible pthreads functions for linker with glibc 2.15
|
2012-03-19 19:54:30 +00:00
|
|
|
if (UNIX AND NOT APPLE)
|
|
|
|
target_link_libraries(openmw ${CMAKE_THREAD_LIBS_INIT})
|
|
|
|
endif()
|
|
|
|
|
2012-01-28 00:36:17 +00:00
|
|
|
if(APPLE)
|
2010-07-08 20:53:14 +00:00
|
|
|
find_library(CARBON_FRAMEWORK Carbon)
|
2012-08-20 17:05:02 +00:00
|
|
|
find_library(COCOA_FRAMEWORK Cocoa)
|
|
|
|
find_library(IOKIT_FRAMEWORK IOKit)
|
|
|
|
target_link_libraries(openmw ${CARBON_FRAMEWORK} ${COCOA_FRAMEWORK} ${IOKIT_FRAMEWORK})
|
2013-02-07 19:40:20 +00:00
|
|
|
|
|
|
|
if (FFMPEG_FOUND)
|
|
|
|
find_library(COREVIDEO_FRAMEWORK CoreVideo)
|
|
|
|
find_library(VDA_FRAMEWORK VideoDecodeAcceleration)
|
|
|
|
target_link_libraries(openmw ${COREVIDEO_FRAMEWORK} ${VDA_FRAMEWORK})
|
|
|
|
endif()
|
2012-01-28 00:36:17 +00:00
|
|
|
endif(APPLE)
|
2011-01-04 19:42:09 +00:00
|
|
|
|
|
|
|
if(DPKG_PROGRAM)
|
|
|
|
INSTALL(TARGETS openmw RUNTIME DESTINATION games COMPONENT openmw)
|
2012-01-28 00:36:17 +00:00
|
|
|
endif(DPKG_PROGRAM)
|
2012-08-19 19:23:46 +00:00
|
|
|
|
|
|
|
if (BUILD_WITH_CODE_COVERAGE)
|
|
|
|
add_definitions (--coverage)
|
|
|
|
target_link_libraries(openmw gcov)
|
|
|
|
endif()
|