2010-07-08 22:53:14 +02:00
|
|
|
# local files
|
2010-08-03 11:14:57 +02:00
|
|
|
set(GAME
|
2010-07-08 22:53:14 +02:00
|
|
|
main.cpp
|
2011-01-14 19:43:51 +01:00
|
|
|
engine.cpp
|
2012-01-28 01:36:17 +01:00
|
|
|
)
|
2013-11-18 12:34:25 +01:00
|
|
|
if(NOT WIN32)
|
|
|
|
set(GAME ${GAME} crashcatcher.cpp)
|
|
|
|
endif()
|
2010-08-03 11:14:57 +02:00
|
|
|
set(GAME_HEADER
|
2011-07-08 14:39:23 +02:00
|
|
|
engine.hpp
|
2012-01-28 01:36:17 +01:00
|
|
|
)
|
2010-07-08 22:53:14 +02:00
|
|
|
source_group(game FILES ${GAME} ${GAME_HEADER})
|
|
|
|
|
2011-10-22 13:55:06 +02:00
|
|
|
add_openmw_dir (mwrender
|
2013-04-29 05:50:40 -07:00
|
|
|
renderingmanager debugging sky camera animation npcanimation creatureanimation activatoranimation
|
2013-08-16 13:01:52 +02:00
|
|
|
actors objects renderinginterface localmap occlusionquery water shadows
|
2014-01-07 21:07:02 +01:00
|
|
|
characterpreview globalmap videoplayer ripplesimulation refraction
|
2014-03-12 11:30:44 +01:00
|
|
|
terrainstorage renderconst effectmanager weaponanimation
|
2011-01-08 15:11:37 +01:00
|
|
|
)
|
2010-07-08 22:53:14 +02:00
|
|
|
|
2011-10-29 13:17:04 +02:00
|
|
|
add_openmw_dir (mwinput
|
2013-01-10 17:21:47 -04:00
|
|
|
inputmanagerimp
|
2010-07-08 22:53:14 +02:00
|
|
|
)
|
|
|
|
|
2011-10-29 13:17:04 +02:00
|
|
|
add_openmw_dir (mwgui
|
2013-04-10 13:05:15 -04:00
|
|
|
textinput widgets race class birth review windowmanagerimp console dialogue
|
2013-05-06 15:30:23 +02:00
|
|
|
windowbase statswindow messagebox journalwindow charactercreation
|
2013-04-10 13:05:15 -04:00
|
|
|
mapwindow windowpinnablebase tooltips scrollwindow bookwindow list
|
2012-05-24 15:57:23 +02:00
|
|
|
formatting inventorywindow container hud countdialog tradewindow settingswindow
|
2012-08-26 10:52:06 +02:00
|
|
|
confirmationdialog alchemywindow referenceinterface spellwindow mainmenu quickkeysmenu
|
2012-09-23 00:36:20 +02:00
|
|
|
itemselection spellbuyingwindow loadingscreen levelupdialog waitdialog spellcreationdialog
|
2013-03-03 12:01:19 +01:00
|
|
|
enchantingdialog trainingwindow travelwindow imagebutton exposedwindow cursor spellicons
|
2013-01-27 12:07:28 -08:00
|
|
|
merchantrepair repair soulgemdialog companionwindow bookpage journalviewmodel journalbooks
|
2013-05-11 18:38:27 +02:00
|
|
|
keywordsearch itemmodel containeritemmodel inventoryitemmodel sortfilteritemmodel itemview
|
2013-11-05 19:50:24 +01:00
|
|
|
tradeitemmodel companionitemmodel pickpocketitemmodel fontloader controllers savegamedialog
|
2014-03-30 23:04:12 +02:00
|
|
|
recharge mode videowidget backgroundimage
|
2010-07-08 22:53:14 +02:00
|
|
|
)
|
|
|
|
|
2011-10-29 13:17:04 +02:00
|
|
|
add_openmw_dir (mwdialogue
|
2012-11-08 16:49:38 +01:00
|
|
|
dialoguemanagerimp journalimp journalentry quest topic filter selectwrapper
|
2010-08-03 13:17:31 +02:00
|
|
|
)
|
2011-10-29 13:17:04 +02:00
|
|
|
|
|
|
|
add_openmw_dir (mwscript
|
2012-08-08 15:18:55 +02:00
|
|
|
locals scriptmanagerimp compilercontext interpretercontext cellextensions miscextensions
|
2011-10-29 13:17:04 +02:00
|
|
|
guiextensions soundextensions skyextensions statsextensions containerextensions
|
|
|
|
aiextensions controlextensions extensions globalscripts ref dialogueextensions
|
2014-03-16 21:39:46 +01:00
|
|
|
animationextensions transformationextensions consoleextensions userextensions
|
2010-08-03 13:17:31 +02:00
|
|
|
)
|
|
|
|
|
2011-10-29 13:17:04 +02:00
|
|
|
add_openmw_dir (mwsound
|
2012-08-09 14:33:21 +02:00
|
|
|
soundmanagerimp openal_output audiere_decoder mpgsnd_decoder ffmpeg_decoder
|
2010-09-30 15:42:28 +02:00
|
|
|
)
|
2011-10-29 13:17:04 +02:00
|
|
|
|
|
|
|
add_openmw_dir (mwworld
|
2012-07-03 12:30:50 +02:00
|
|
|
refdata worldimp physicssystem scene globals class action nullaction actionteleport
|
2012-11-17 18:17:08 +01:00
|
|
|
containerstore actiontalk actiontake manualref player cellfunctors failedaction
|
2012-05-11 16:41:27 +02:00
|
|
|
cells localscripts customdata weather inventorystore ptr actionopen actionread
|
2012-09-13 13:02:26 +02:00
|
|
|
actionequip timestamp actionalchemy cellstore actionapply actioneat
|
2013-04-28 14:59:15 +02:00
|
|
|
esmstore store recordcmp fallback actionrepair actionsoulgem livecellref actiondoor
|
2014-02-23 20:11:05 +01:00
|
|
|
contentloader esmloader omwloader actiontrap cellreflist
|
2010-07-26 12:52:32 +02:00
|
|
|
)
|
2010-07-08 22:53:14 +02:00
|
|
|
|
2011-10-29 13:17:04 +02: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 11:15:38 +02:00
|
|
|
)
|
2011-10-29 13:17:04 +02:00
|
|
|
|
|
|
|
add_openmw_dir (mwmechanics
|
2013-03-31 15:29:41 -07:00
|
|
|
mechanicsmanagerimp stat character creaturestats magiceffects movement actors objects
|
2014-04-02 00:18:22 -04:00
|
|
|
drawstate spells activespells npcstats aipackage aisequence aipersue alchemy aiwander aitravel aifollow
|
2014-04-04 06:13:47 +11:00
|
|
|
aiescort aiactivate aicombat repair enchanting pathfinding pathgrid security spellsuccess spellcasting
|
2014-04-18 09:03:36 +10:00
|
|
|
disease pickpocket levelledlist combat steering obstacle
|
2010-07-26 11:15:38 +02:00
|
|
|
)
|
2010-07-08 22:53:14 +02:00
|
|
|
|
2013-11-16 10:31:46 +01:00
|
|
|
add_openmw_dir (mwstate
|
2013-11-19 15:38:26 +01:00
|
|
|
statemanagerimp charactermanager character
|
2010-07-26 11:15:38 +02:00
|
|
|
)
|
2010-07-08 22:53:14 +02:00
|
|
|
|
2012-04-23 10:57:16 +02:00
|
|
|
add_openmw_dir (mwbase
|
2012-08-11 17:30:55 +02:00
|
|
|
environment world scriptmanager dialoguemanager journal soundmanager mechanicsmanager
|
2013-11-19 15:38:26 +01:00
|
|
|
inputmanager windowmanager statemanager
|
2012-04-23 10:57:16 +02:00
|
|
|
)
|
|
|
|
|
2010-07-08 22:53:14 +02:00
|
|
|
# Main executable
|
2013-12-29 16:25:49 -05:00
|
|
|
set(BOOST_COMPONENTS system filesystem program_options thread wave)
|
|
|
|
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
2013-02-03 13:47:55 +01:00
|
|
|
|
2012-03-15 15:51:39 +01:00
|
|
|
IF(OGRE_STATIC)
|
2013-02-03 13:47:55 +01: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 15:51:39 +01:00
|
|
|
IF(WIN32)
|
2013-02-03 13:47:55 +01:00
|
|
|
ADD_DEFINITIONS(-DENABLE_PLUGIN_Direct3D9)
|
|
|
|
list (APPEND OGRE_STATIC_PLUGINS ${OGRE_RenderSystem_Direct3D9_LIBRARIES})
|
2012-03-15 15:51:39 +01:00
|
|
|
ENDIF(WIN32)
|
2013-02-03 13:47:55 +01: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 15:51:39 +01:00
|
|
|
ENDIF(OGRE_STATIC)
|
2013-02-03 13:47:55 +01:00
|
|
|
|
2010-07-08 22:53:14 +02:00
|
|
|
add_executable(openmw
|
|
|
|
${OPENMW_LIBS} ${OPENMW_LIBS_HEADER}
|
2011-10-22 13:55:06 +02:00
|
|
|
${OPENMW_FILES}
|
2011-10-29 13:17:04 +02:00
|
|
|
${GAME} ${GAME_HEADER}
|
2010-07-08 22:53:14 +02:00
|
|
|
${APPLE_BUNDLE_RESOURCES}
|
2012-01-28 01:36:17 +01:00
|
|
|
)
|
2011-11-06 09:30:15 +01:00
|
|
|
|
2010-08-13 22:30:22 +02:00
|
|
|
# Sound stuff - here so CMake doesn't stupidly recompile EVERYTHING
|
|
|
|
# when we change the backend.
|
2011-01-30 13:19:41 +01:00
|
|
|
include_directories(${SOUND_INPUT_INCLUDES} ${BULLET_INCLUDE_DIRS})
|
2010-08-13 22:30:22 +02:00
|
|
|
add_definitions(${SOUND_DEFINE})
|
|
|
|
|
2010-07-08 22:53:14 +02:00
|
|
|
target_link_libraries(openmw
|
2012-01-28 01:36:17 +01:00
|
|
|
${OGRE_LIBRARIES}
|
2012-03-19 20:54:30 +01:00
|
|
|
${OGRE_STATIC_PLUGINS}
|
2013-12-29 16:25:49 -05:00
|
|
|
${SHINY_LIBRARIES}
|
2012-01-28 01:36:17 +01:00
|
|
|
${Boost_LIBRARIES}
|
|
|
|
${OPENAL_LIBRARY}
|
|
|
|
${SOUND_INPUT_LIBRARY}
|
|
|
|
${BULLET_LIBRARIES}
|
2012-03-18 15:11:37 +01:00
|
|
|
${MYGUI_LIBRARIES}
|
2013-01-08 06:19:05 -04:00
|
|
|
${SDL2_LIBRARY}
|
2012-03-27 00:36:53 +02:00
|
|
|
${MYGUI_PLATFORM_LIBRARIES}
|
2012-08-12 20:45:02 +02:00
|
|
|
"oics"
|
2013-01-10 17:21:47 -04:00
|
|
|
"sdl4ogre"
|
2012-07-19 16:23:30 +02:00
|
|
|
components
|
2010-07-08 22:53:14 +02:00
|
|
|
)
|
|
|
|
|
2013-09-14 13:33:49 +02:00
|
|
|
if (USE_SYSTEM_TINYXML)
|
|
|
|
target_link_libraries(openmw ${TINYXML_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
2013-06-27 21:45:32 +02:00
|
|
|
if (NOT UNIX)
|
|
|
|
target_link_libraries(openmw ${SDL2MAIN_LIBRARY})
|
|
|
|
endif()
|
|
|
|
|
2012-03-21 12:20:19 +01:00
|
|
|
# Fix for not visible pthreads functions for linker with glibc 2.15
|
2012-03-19 20:54:30 +01:00
|
|
|
if (UNIX AND NOT APPLE)
|
|
|
|
target_link_libraries(openmw ${CMAKE_THREAD_LIBS_INIT})
|
|
|
|
endif()
|
|
|
|
|
2012-01-28 01:36:17 +01:00
|
|
|
if(APPLE)
|
2012-08-20 21:05:02 +04:00
|
|
|
find_library(COCOA_FRAMEWORK Cocoa)
|
|
|
|
find_library(IOKIT_FRAMEWORK IOKit)
|
2013-06-15 14:47:33 +04:00
|
|
|
target_link_libraries(openmw ${COCOA_FRAMEWORK} ${IOKIT_FRAMEWORK})
|
2013-02-07 23:40:20 +04: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 01:36:17 +01:00
|
|
|
endif(APPLE)
|
2011-01-04 20:42:09 +01:00
|
|
|
|
|
|
|
if(DPKG_PROGRAM)
|
|
|
|
INSTALL(TARGETS openmw RUNTIME DESTINATION games COMPONENT openmw)
|
2012-01-28 01:36:17 +01:00
|
|
|
endif(DPKG_PROGRAM)
|
2012-08-19 22:23:46 +03:00
|
|
|
|
|
|
|
if (BUILD_WITH_CODE_COVERAGE)
|
|
|
|
add_definitions (--coverage)
|
|
|
|
target_link_libraries(openmw gcov)
|
|
|
|
endif()
|
2014-03-05 22:11:10 +11:00
|
|
|
|
|
|
|
if (MSVC)
|
|
|
|
# Debug version needs increased number of sections beyond 2^16
|
|
|
|
if (CMAKE_CL_64)
|
|
|
|
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /bigobj")
|
|
|
|
endif (CMAKE_CL_64)
|
|
|
|
endif (MSVC)
|