testing: cmake script simplification

actorid
Marc Zinnschlag 13 years ago
parent a3a1b82929
commit ad086312b8

@ -7,6 +7,12 @@ IF (APPLE)
set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.6.sdk")
ENDIF (APPLE)
# Macros
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
include (OpenMWMacros)
# Version
set (OPENMW_VERSION_MAJOR 0)
@ -76,9 +82,6 @@ ELSE()
message (STATUS "OpenMW pre-built binaries not found. Using standard locations.")
ENDIF()
# Add path for CMake scripts
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
# source directory: components
set(COMP_DIR ${CMAKE_SOURCE_DIR}/components)

@ -15,26 +15,9 @@ set(GAME_HEADER
config.hpp)
source_group(game FILES ${GAME} ${GAME_HEADER})
set(GAMEREND
mwrender/rendering_manager.cpp
mwrender/mwscene.cpp
mwrender/cellimp.cpp
mwrender/interior.cpp
mwrender/exterior.cpp
mwrender/sky.cpp
mwrender/player.cpp
add_openmw_dir (mwrender
rendering_manager mwscene cellimp interior exterior sky player
)
set(GAMEREND_HEADER
mwrender/rendering_manager.hpp
mwrender/cell.hpp
mwrender/cellimp.hpp
mwrender/mwscene.hpp
mwrender/interior.hpp
mwrender/exterior.hpp
mwrender/sky.hpp
mwrender/player.hpp
)
source_group(apps\\openmw\\mwrender FILES ${GAMEREND} ${GAMEREND_HEADER})
set(GAMEINPUT
mwinput/inputmanager.cpp
@ -237,10 +220,10 @@ set(GAMEMECHANICS_HEADER
)
source_group(apps\\openmw\\mwmechanics FILES ${GAMEMECHANICS} ${GAMEMECHANICS_HEADER})
set(OPENMW_CPP ${GAME} ${GAMEREND} ${GAMEINPUT} ${GAMESCRIPT} ${GAMESOUND} ${GAMEGUI} ${GAMEWORLD}
set(OPENMW_CPP ${GAME} ${GAMEINPUT} ${GAMESCRIPT} ${GAMESOUND} ${GAMEGUI} ${GAMEWORLD}
${GAMECLASS} ${GAMEMECHANICS} ${GAMEDIALOGUE}
)
set(OPENMW_HEADER ${GAME_HEADER} ${GAMEREND_HEADER} ${GAMEINPUT_HEADER} ${GAMESCRIPT_HEADER}
set(OPENMW_HEADER ${GAMEREND_HEADER} ${GAMEINPUT_HEADER} ${GAMESCRIPT_HEADER}
${GAMESOUND_HEADER} ${GAMEGUI_HEADER} ${GAMEWORLD_HEADER} ${GAMECLASS_HEADER}
${GAMEMECHANICS_HEADER} ${GAMEDIALOG_HEADERUE}
)
@ -249,6 +232,7 @@ set(OPENMW_HEADER ${GAME_HEADER} ${GAMEREND_HEADER} ${GAMEINPUT_HEADER} ${GAMESC
add_executable(openmw
${COMPONENTS} ${COMPONENTS_HEADER}
${OPENMW_LIBS} ${OPENMW_LIBS_HEADER}
${OPENMW_FILES}
${OPENMW_CPP} ${OPENMW_HEADER}
${APPLE_BUNDLE_RESOURCES}
)

@ -0,0 +1,9 @@
macro (add_openmw_dir dir)
set (files)
foreach (u ${ARGN})
list (APPEND files "${dir}/${u}")
list (APPEND OPENMW_FILES "${dir}/${u}")
endforeach (u)
source_group (apps\\openmw\\${dir} FILES ${files})
endmacro (add_openmw_dir)
Loading…
Cancel
Save