1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 21:19:57 +00:00
openmw-tes3mp/apps/openmw/CMakeLists.txt

256 lines
9.2 KiB
Text
Raw Normal View History

# local files
2014-08-26 15:31:34 +00:00
set(GAME
main.cpp
engine.cpp
2014-09-04 21:17:31 +00:00
2016-08-24 01:01:05 +00:00
${CMAKE_SOURCE_DIR}/files/tes3mp/tes3mp.rc
2014-08-26 15:31:34 +00:00
)
if (ANDROID)
2015-03-15 17:15:58 +00:00
set(GAME ${GAME} android_commandLine.cpp)
2014-08-26 15:31:34 +00:00
set(GAME ${GAME} android_main.c)
2014-09-05 22:02:39 +00:00
endif()
2014-08-26 15:31:34 +00:00
2014-09-05 22:02:39 +00:00
if(NOT WIN32 AND NOT ANDROID)
set(GAME ${GAME} crashcatcher.cpp)
endif()
set(GAME_HEADER
engine.hpp
2012-01-28 00:36:17 +00:00
)
source_group(game FILES ${GAME} ${GAME_HEADER})
2011-10-22 11:55:06 +00:00
add_openmw_dir (mwrender
2015-05-31 16:53:16 +00:00
actors objects renderingmanager animation rotatecontroller sky npcanimation vismask
2015-05-30 23:07:43 +00:00
creatureanimation effectmanager util renderinginterface pathgrid rendermode weaponanimation
2015-06-16 18:36:48 +00:00
bulletdebugdraw globalmap characterpreview camera localmap water terrainstorage ripplesimulation
renderbin actoranimation landmanager
)
2015-05-03 15:24:35 +00:00
add_openmw_dir (mwinput
inputmanagerimp
)
add_openmw_dir (mwgui
2015-05-01 00:09:57 +00:00
layout textinput widgets race class birth review windowmanagerimp console dialogue
2013-05-06 13:30:23 +00:00
windowbase statswindow messagebox journalwindow charactercreation
mapwindow windowpinnablebase tooltips scrollwindow bookwindow
formatting inventorywindow container hud countdialog tradewindow settingswindow
confirmationdialog alchemywindow referenceinterface spellwindow mainmenu quickkeysmenu
2012-09-22 22:36:20 +00:00
itemselection spellbuyingwindow loadingscreen levelupdialog waitdialog spellcreationdialog
enchantingdialog trainingwindow travelwindow exposedwindow cursor spellicons
merchantrepair repair soulgemdialog companionwindow bookpage journalviewmodel journalbooks
itemmodel containeritemmodel inventoryitemmodel sortfilteritemmodel itemview
tradeitemmodel companionitemmodel pickpocketitemmodel controllers savegamedialog
recharge mode videowidget backgroundimage itemwidget screenfader debugwindow spellmodel spellview
draganddrop timeadvancer jailscreen itemchargeview
)
add_openmw_dir (mwdialogue
dialoguemanagerimp journalimp journalentry quest topic filter selectwrapper hypertextparser keywordsearch scripttest
)
add_openmw_dir (mwscript
locals scriptmanagerimp compilercontext interpretercontext cellextensions miscextensions
guiextensions soundextensions skyextensions statsextensions containerextensions
aiextensions controlextensions extensions globalscripts ref dialogueextensions
2014-03-16 20:39:46 +00:00
animationextensions transformationextensions consoleextensions userextensions
)
add_openmw_dir (mwsound
soundmanagerimp openal_output ffmpeg_decoder sound sound_buffer sound_decoder sound_output loudness movieaudiofactory
)
add_openmw_dir (mwworld
refdata worldimp scene globals class action nullaction actionteleport
2015-12-06 17:13:04 +00:00
containerstore actiontalk actiontake manualref player cellvisitors failedaction
cells localscripts customdata inventorystore ptr actionopen actionread
actionequip timestamp actionalchemy cellstore actionapply actioneat
2015-09-24 13:21:42 +00:00
store esmstore recordcmp fallback actionrepair actionsoulgem livecellref actiondoor
2015-06-01 19:41:13 +00:00
contentloader esmloader actiontrap cellreflist cellref physicssystem weather projectilemanager
cellpreloader
)
add_openmw_dir (mwphysics
physicssystem trace collisiontype actor convert
)
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 actor bodypart
)
add_openmw_dir (mwmechanics
2015-08-21 09:12:39 +00:00
mechanicsmanagerimp stat creaturestats magiceffects movement actorutil
drawstate spells activespells npcstats aipackage aisequence aipursue alchemy aiwander aitravel aifollow aiavoiddoor
aiescort aiactivate aicombat repair enchanting pathfinding pathgrid security spellsuccess spellcasting
disease pickpocket levelledlist combat steering obstacle autocalcspell difficultyscaling aicombataction actor summoning
character actors objects aistate coordinateconverter trading aiface
)
2013-11-16 09:31:46 +00:00
add_openmw_dir (mwstate
statemanagerimp charactermanager character
)
add_openmw_dir (mwbase
environment world scriptmanager dialoguemanager journal soundmanager mechanicsmanager
inputmanager windowmanager statemanager
)
add_openmw_dir (mwmp Main Networking LocalPlayer DedicatedPlayer PlayerList LocalActor DedicatedActor ActorList WorldEvent
2017-06-06 16:06:10 +00:00
Cell CellController MechanicsHelper GUIController
)
add_openmw_dir (mwmp/GUI GUIChat GUILogin PlayerMarkerCollection GUIDialogList TextInputDialog
)
add_openmw_dir(mwmp/processors BaseClientPacketProcessor PlayerProcessor WorldProcessor ActorProcessor ProcessorInitializer
)
2016-01-04 12:17:30 +00:00
add_openmw_dir (mwmp/processors/actor ProcessorActorAI ProcessorActorAnimFlags ProcessorActorAnimPlay ProcessorActorAttack
ProcessorActorAuthority ProcessorActorCellChange ProcessorActorDeath ProcessorActorEquipment ProcessorActorList
ProcessorActorPosition ProcessorActorSpeech ProcessorActorStatsDynamic ProcessorActorTest
)
add_openmw_dir (mwmp/processors/player ProcessorChatMessage ProcessorGUIMessageBox ProcessorHandshake ProcessorUserDisconnected
ProcessorUserMyID ProcessorGameConsole ProcessorGameTime ProcessorGameWeather ProcessorPlayerBaseInfo
ProcessorPlayerAnimFlags ProcessorPlayerAnimPlay ProcessorPlayerAttack ProcessorPlayerAttribute ProcessorPlayerBook
ProcessorPlayerBounty ProcessorPlayerCellChange ProcessorPlayerCellState ProcessorPlayerCharClass ProcessorPlayerCharGen
ProcessorPlayerDeath ProcessorPlayerDisposition ProcessorPlayerEquipment ProcessorPlayerFaction ProcessorPlayerInventory
ProcessorPlayerJournal ProcessorPlayerKillCount ProcessorPlayerLevel ProcessorPlayerMap ProcessorPlayerPosition
ProcessorPlayerResurrect ProcessorPlayerSkill ProcessorPlayerSpeech ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic
ProcessorPlayerTopic
)
2017-05-25 15:56:22 +00:00
add_openmw_dir (mwmp/processors/world BaseObjectProcessor ProcessorContainer ProcessorDoorState ProcessorMusicPlay
ProcessorVideoPlay ProcessorObjectAnimPlay ProcessorObjectDelete ProcessorObjectLock ProcessorObjectMove
ProcessorObjectPlace ProcessorObjectRotate ProcessorObjectScale ProcessorObjectSpawn ProcessorObjectTrap
ProcessorScriptLocalShort ProcessorScriptLocalFloat ProcessorScriptMemberShort ProcessorScriptGlobalShort
)
# Main executable
2013-02-03 12:47:55 +00:00
if (NOT ANDROID)
2016-08-19 01:38:06 +00:00
add_executable(tes3mp
2014-08-06 03:59:39 +00:00
${OPENMW_FILES}
${GAME} ${GAME_HEADER}
${APPLE_BUNDLE_RESOURCES}
)
2014-08-05 20:46:21 +00:00
else ()
2016-08-19 01:38:06 +00:00
add_library(tes3mp
2014-08-06 03:59:39 +00:00
SHARED
${OPENMW_FILES}
${GAME} ${GAME_HEADER}
)
2014-08-05 20:46:21 +00:00
endif ()
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.
include_directories(
${FFmpeg_INCLUDE_DIRS}
)
2010-08-13 20:30:22 +00:00
2016-08-19 01:38:06 +00:00
target_link_libraries(tes3mp
${OSG_LIBRARIES}
${OPENTHREADS_LIBRARIES}
${OSGPARTICLE_LIBRARIES}
${OSGUTIL_LIBRARIES}
${OSGDB_LIBRARIES}
${OSGVIEWER_LIBRARIES}
${OSGGA_LIBRARIES}
${Boost_SYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY}
${Boost_FILESYSTEM_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY}
2012-01-28 00:36:17 +00:00
${OPENAL_LIBRARY}
${FFmpeg_LIBRARIES}
2016-06-12 20:34:53 +00:00
${MyGUI_LIBRARIES}
${SDL2_LIBRARY}
2015-04-19 18:14:06 +00:00
"osg-ffmpeg-videoplayer"
2012-08-12 18:45:02 +00:00
"oics"
components
${RakNet_LIBRARY}
)
if (ANDROID)
2015-12-02 19:40:04 +00:00
set (OSG_PLUGINS
-Wl,--whole-archive
)
foreach(PLUGIN_NAME ${USED_OSG_PLUGINS})
set(OSG_PLUGINS ${OSG_PLUGINS} ${OSG_PLUGINS_DIR}/lib${PLUGIN_NAME}.a)
endforeach()
set (OSG_PLUGINS
${OSG_PLUGINS} -Wl,--no-whole-archive
)
2016-08-19 01:38:06 +00:00
target_link_libraries(tes3mp
2014-08-06 03:59:39 +00:00
EGL
android
log
2014-09-14 09:28:28 +00:00
dl
2015-12-02 19:40:04 +00:00
z
${OPENSCENEGRAPH_LIBRARIES}
${OSG_PLUGINS}
jpeg
gif
png
2014-08-06 03:59:39 +00:00
)
endif (ANDROID)
2013-09-14 11:33:49 +00:00
if (USE_SYSTEM_TINYXML)
2016-08-19 01:38:06 +00:00
target_link_libraries(tes3mp ${TinyXML_LIBRARIES})
2013-09-14 11:33:49 +00:00
endif()
2013-06-27 19:45:32 +00:00
if (NOT UNIX)
2016-08-19 01:38:06 +00:00
target_link_libraries(tes3mp ${SDL2MAIN_LIBRARY})
2013-06-27 19:45:32 +00:00
endif()
# Fix for not visible pthreads functions for linker with glibc 2.15
if (UNIX AND NOT APPLE)
2016-08-19 01:38:06 +00:00
target_link_libraries(tes3mp ${CMAKE_THREAD_LIBS_INIT})
endif()
2012-01-28 00:36:17 +00:00
if(APPLE)
set(BUNDLE_RESOURCES_DIR "${APP_BUNDLE_DIR}/Contents/Resources")
set(OPENMW_MYGUI_FILES_ROOT ${BUNDLE_RESOURCES_DIR})
set(OPENMW_SHADERS_ROOT ${BUNDLE_RESOURCES_DIR})
add_subdirectory(../../files/ ${CMAKE_CURRENT_BINARY_DIR}/files)
configure_file("${OpenMW_BINARY_DIR}/settings-default.cfg" ${BUNDLE_RESOURCES_DIR} COPYONLY)
configure_file("${OpenMW_BINARY_DIR}/openmw.cfg" ${BUNDLE_RESOURCES_DIR} COPYONLY)
configure_file("${OpenMW_BINARY_DIR}/gamecontrollerdb.txt" ${BUNDLE_RESOURCES_DIR} COPYONLY)
add_custom_command(TARGET openmw
POST_BUILD
COMMAND cp "${OpenMW_BINARY_DIR}/resources/version" "${BUNDLE_RESOURCES_DIR}/resources")
2012-08-20 17:05:02 +00:00
find_library(COCOA_FRAMEWORK Cocoa)
find_library(IOKIT_FRAMEWORK IOKit)
2016-08-19 01:38:06 +00:00
target_link_libraries(tes3mp ${COCOA_FRAMEWORK} ${IOKIT_FRAMEWORK})
if (FFmpeg_FOUND)
find_library(COREVIDEO_FRAMEWORK CoreVideo)
find_library(VDA_FRAMEWORK VideoDecodeAcceleration)
target_link_libraries(tes3mp z ${COREVIDEO_FRAMEWORK} ${VDA_FRAMEWORK})
endif()
2012-01-28 00:36:17 +00:00
endif(APPLE)
if (BUILD_WITH_CODE_COVERAGE)
add_definitions (--coverage)
2016-08-19 01:38:06 +00:00
target_link_libraries(tes3mp gcov)
endif()
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)
if (WIN32)
2016-11-17 19:43:05 +00:00
INSTALL(TARGETS tes3mp RUNTIME DESTINATION ".")
endif (WIN32)