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

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