2010-07-08 22:53:14 +02:00
|
|
|
# local files
|
2014-08-26 17:31:34 +02:00
|
|
|
set(GAME
|
|
|
|
main.cpp
|
|
|
|
engine.cpp
|
2014-09-05 07:17:31 +10:00
|
|
|
|
2014-09-05 22:36:33 +10:00
|
|
|
${CMAKE_SOURCE_DIR}/files/windows/openmw.rc
|
2014-08-26 17:31:34 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
if (ANDROID)
|
2015-03-15 21:15:58 +04:00
|
|
|
set(GAME ${GAME} android_commandLine.cpp)
|
2014-08-26 17:31:34 +02:00
|
|
|
set(GAME ${GAME} android_main.c)
|
2014-09-06 02:02:39 +04:00
|
|
|
endif()
|
2014-08-26 17:31:34 +02:00
|
|
|
|
2014-09-06 02:02:39 +04:00
|
|
|
if(NOT WIN32 AND NOT ANDROID)
|
2013-11-18 12:34:25 +01:00
|
|
|
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
|
2015-05-31 18:53:16 +02:00
|
|
|
actors objects renderingmanager animation rotatecontroller sky npcanimation vismask
|
2015-05-31 01:07:43 +02:00
|
|
|
creatureanimation effectmanager util renderinginterface pathgrid rendermode weaponanimation
|
2015-06-16 20:36:48 +02:00
|
|
|
bulletdebugdraw globalmap characterpreview camera localmap water terrainstorage ripplesimulation
|
2011-01-08 15:11:37 +01:00
|
|
|
)
|
2010-07-08 22:53:14 +02:00
|
|
|
|
2015-05-03 17:24:35 +02:00
|
|
|
add_openmw_dir (mwinput
|
|
|
|
inputmanagerimp
|
|
|
|
)
|
2010-07-08 22:53:14 +02:00
|
|
|
|
2011-10-29 13:17:04 +02:00
|
|
|
add_openmw_dir (mwgui
|
2015-05-01 02:09:57 +02:00
|
|
|
layout textinput widgets race class birth review windowmanagerimp console dialogue
|
2013-05-06 15:30:23 +02:00
|
|
|
windowbase statswindow messagebox journalwindow charactercreation
|
2014-09-25 16:25:08 +02:00
|
|
|
mapwindow windowpinnablebase tooltips scrollwindow bookwindow
|
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
|
2014-09-12 05:14:21 +02:00
|
|
|
enchantingdialog trainingwindow travelwindow exposedwindow cursor spellicons
|
2013-01-27 12:07:28 -08:00
|
|
|
merchantrepair repair soulgemdialog companionwindow bookpage journalviewmodel journalbooks
|
2014-10-18 19:51:07 +02:00
|
|
|
itemmodel containeritemmodel inventoryitemmodel sortfilteritemmodel itemview
|
2014-09-12 04:27:23 +02:00
|
|
|
tradeitemmodel companionitemmodel pickpocketitemmodel controllers savegamedialog
|
2014-12-15 13:13:25 +01:00
|
|
|
recharge mode videowidget backgroundimage itemwidget screenfader debugwindow spellmodel spellview
|
2015-05-01 01:15:25 +02:00
|
|
|
draganddrop timeadvancer jailscreen
|
2010-07-08 22:53:14 +02:00
|
|
|
)
|
|
|
|
|
2011-10-29 13:17:04 +02:00
|
|
|
add_openmw_dir (mwdialogue
|
2014-12-13 02:47:04 +01:00
|
|
|
dialoguemanagerimp journalimp journalentry quest topic filter selectwrapper hypertextparser keywordsearch scripttest
|
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
|
2015-04-19 20:07:18 +02:00
|
|
|
soundmanagerimp openal_output ffmpeg_decoder sound sound_decoder sound_output loudness libavwrapper movieaudiofactory
|
2010-09-30 15:42:28 +02:00
|
|
|
)
|
2011-10-29 13:17:04 +02:00
|
|
|
|
|
|
|
add_openmw_dir (mwworld
|
2015-04-01 17:02:15 +02:00
|
|
|
refdata worldimp scene globals class action nullaction actionteleport
|
2012-11-17 18:17:08 +01:00
|
|
|
containerstore actiontalk actiontake manualref player cellfunctors failedaction
|
2015-04-01 17:02:15 +02:00
|
|
|
cells localscripts customdata 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
|
2015-06-01 21:41:13 +02:00
|
|
|
contentloader esmloader actiontrap cellreflist cellref physicssystem weather projectilemanager
|
2010-07-26 12:52:32 +02:00
|
|
|
)
|
2010-07-08 22:53:14 +02:00
|
|
|
|
2015-05-10 01:09:00 +02:00
|
|
|
add_openmw_dir (mwphysics
|
2015-05-12 03:02:15 +02:00
|
|
|
physicssystem trace collisiontype actor convert
|
2015-05-10 01:09:00 +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
|
2015-04-01 17:02:15 +02:00
|
|
|
mechanicsmanagerimp stat creaturestats magiceffects movement
|
2014-05-13 03:58:32 -04:00
|
|
|
drawstate spells activespells npcstats aipackage aisequence aipursue alchemy aiwander aitravel aifollow aiavoiddoor
|
2014-04-04 06:13:47 +11:00
|
|
|
aiescort aiactivate aicombat repair enchanting pathfinding pathgrid security spellsuccess spellcasting
|
2015-01-05 18:52:37 +01:00
|
|
|
disease pickpocket levelledlist combat steering obstacle autocalcspell difficultyscaling aicombataction actor summoning
|
2015-06-04 20:10:07 +02:00
|
|
|
character actors objects aistate
|
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-02-03 13:47:55 +01:00
|
|
|
|
2014-08-04 19:49:54 +04:00
|
|
|
if (NOT ANDROID)
|
2014-08-06 07:59:39 +04:00
|
|
|
add_executable(openmw
|
|
|
|
${OPENMW_FILES}
|
|
|
|
${GAME} ${GAME_HEADER}
|
|
|
|
${APPLE_BUNDLE_RESOURCES}
|
|
|
|
)
|
2014-08-06 00:46:21 +04:00
|
|
|
else ()
|
2014-09-14 11:28:28 +02:00
|
|
|
add_library(openmw
|
2014-08-06 07:59:39 +04:00
|
|
|
SHARED
|
|
|
|
${OPENMW_FILES}
|
|
|
|
${GAME} ${GAME_HEADER}
|
|
|
|
)
|
2014-08-06 00:46:21 +04:00
|
|
|
endif ()
|
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.
|
2015-03-06 00:56:37 +01:00
|
|
|
include_directories(${SOUND_INPUT_INCLUDES})
|
2010-08-13 22:30:22 +02:00
|
|
|
|
2010-07-08 22:53:14 +02:00
|
|
|
target_link_libraries(openmw
|
2015-04-12 15:34:50 +02:00
|
|
|
${OPENSCENEGRAPH_LIBRARIES}
|
2015-06-11 23:49:27 +02:00
|
|
|
${Boost_SYSTEM_LIBRARY}
|
|
|
|
${Boost_THREAD_LIBRARY}
|
|
|
|
${Boost_FILESYSTEM_LIBRARY}
|
|
|
|
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
2012-01-28 01:36:17 +01:00
|
|
|
${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}
|
2015-04-19 20:14:06 +02:00
|
|
|
"osg-ffmpeg-videoplayer"
|
2012-08-12 20:45:02 +02:00
|
|
|
"oics"
|
2012-07-19 16:23:30 +02:00
|
|
|
components
|
2010-07-08 22:53:14 +02:00
|
|
|
)
|
|
|
|
|
2014-08-04 19:49:54 +04:00
|
|
|
if (ANDROID)
|
2014-08-06 07:59:39 +04:00
|
|
|
target_link_libraries(openmw
|
|
|
|
EGL
|
|
|
|
android
|
|
|
|
log
|
2014-09-14 11:28:28 +02:00
|
|
|
dl
|
2014-08-06 07:59:39 +04:00
|
|
|
MyGUIEngineStatic
|
|
|
|
cpufeatures
|
|
|
|
BulletCollision
|
2014-09-14 11:28:28 +02:00
|
|
|
LinearMath
|
2014-08-06 07:59:39 +04:00
|
|
|
)
|
2014-08-04 19:49:54 +04:00
|
|
|
endif (ANDROID)
|
|
|
|
|
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
|
|
|
|
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)
|