1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 03:54:40 +00:00
OpenMW/apps/openmw/CMakeLists.txt

152 lines
5.2 KiB
CMake
Raw Normal View History

# 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")
# local files
set(GAME
main.cpp
engine.cpp
2012-01-28 00:36:17 +00:00
)
set(GAME_HEADER
engine.hpp
2012-01-28 00:36:17 +00:00
config.hpp
)
source_group(game FILES ${GAME} ${GAME_HEADER})
2011-10-22 11:55:06 +00:00
add_openmw_dir (mwrender
renderingmanager debugging sky player animation npcanimation creatureanimation activatoranimation
actors objects renderinginterface localmap occlusionquery terrain terrainmaterial water shadows
compositors characterpreview externalrendering globalmap videoplayer ripplesimulation refraction
)
add_openmw_dir (mwinput
inputmanagerimp
)
add_openmw_dir (mwgui
2013-04-10 17:05:15 +00:00
textinput widgets race class birth review windowmanagerimp console dialogue
dialoguehistory windowbase statswindow messagebox journalwindow charactercreation
mapwindow windowpinnablebase tooltips scrollwindow bookwindow list
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
2013-03-03 11:01:19 +00:00
enchantingdialog trainingwindow travelwindow imagebutton exposedwindow cursor spellicons
2013-03-31 11:13:46 +00:00
merchantrepair repair soulgemdialog companionwindow
)
add_openmw_dir (mwdialogue
dialoguemanagerimp journalimp journalentry quest topic filter selectwrapper
)
add_openmw_dir (mwscript
locals scriptmanagerimp compilercontext interpretercontext cellextensions miscextensions
guiextensions soundextensions skyextensions statsextensions containerextensions
aiextensions controlextensions extensions globalscripts ref dialogueextensions
2013-02-03 13:27:27 +00:00
animationextensions transformationextensions consoleextensions userextensions locals
)
add_openmw_dir (mwsound
soundmanagerimp openal_output audiere_decoder mpgsnd_decoder ffmpeg_decoder
)
add_openmw_dir (mwworld
refdata worldimp physicssystem scene globals class action nullaction actionteleport
2012-11-17 17:17:08 +00:00
containerstore actiontalk actiontake manualref player cellfunctors failedaction
cells localscripts customdata weather inventorystore ptr actionopen actionread
actionequip timestamp actionalchemy cellstore actionapply actioneat
2013-04-28 12:59:15 +00:00
esmstore store recordcmp fallback actionrepair actionsoulgem livecellref actiondoor
)
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
)
add_openmw_dir (mwmechanics
mechanicsmanagerimp stat character creaturestats magiceffects movement actors objects
drawstate spells activespells npcstats aipackage aisequence alchemy aiwander aitravel aifollow
aiescort aiactivate repair enchanting pathfinding
)
add_openmw_dir (mwbase
environment world scriptmanager dialoguemanager journal soundmanager mechanicsmanager
inputmanager windowmanager
)
# Main executable
2013-02-03 12:47:55 +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})
IF(WIN32)
2013-02-03 12:47:55 +00:00
ADD_DEFINITIONS(-DENABLE_PLUGIN_Direct3D9)
list (APPEND OGRE_STATIC_PLUGINS ${OGRE_RenderSystem_Direct3D9_LIBRARIES})
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)
ENDIF(OGRE_STATIC)
2013-02-03 12:47:55 +00:00
add_executable(openmw
${OPENMW_LIBS} ${OPENMW_LIBS_HEADER}
2011-10-22 11:55:06 +00:00
${OPENMW_FILES}
${GAME} ${GAME_HEADER}
${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})
target_link_libraries(openmw
2012-01-28 00:36:17 +00:00
${OGRE_LIBRARIES}
${OGRE_Terrain_LIBRARY}
${OGRE_STATIC_PLUGINS}
2012-01-28 00:36:17 +00:00
${OIS_LIBRARIES}
${Boost_LIBRARIES}
${OPENAL_LIBRARY}
${SOUND_INPUT_LIBRARY}
${BULLET_LIBRARIES}
${MYGUI_LIBRARIES}
${MYGUI_PLATFORM_LIBRARIES}
2012-07-03 20:48:16 +00:00
"shiny"
"shiny.OgrePlatform"
2012-08-12 18:45:02 +00:00
"oics"
components
)
# Fix for not visible pthreads functions for linker with glibc 2.15
if (UNIX AND NOT APPLE)
target_link_libraries(openmw ${CMAKE_THREAD_LIBS_INIT})
endif()
# Workaround for binutil => 2.23 problem when linking, should be fixed eventually upstream
if (UNIX AND NOT APPLE)
target_link_libraries(openmw dl Xt)
endif()
2012-01-28 00:36:17 +00:00
if(APPLE)
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})
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)
if(DPKG_PROGRAM)
INSTALL(TARGETS openmw RUNTIME DESTINATION games COMPONENT openmw)
2012-01-28 00:36:17 +00:00
endif(DPKG_PROGRAM)
if (BUILD_WITH_CODE_COVERAGE)
add_definitions (--coverage)
target_link_libraries(openmw gcov)
endif()