add building of EDITOR2 to cmake recipe

This commit is contained in:
Nils Kneuper 2008-06-18 19:06:09 +00:00
parent 1a0d797203
commit 2b285a5af2
2 changed files with 25 additions and 0 deletions

View file

@ -59,6 +59,7 @@ option(ENABLE_GAME "Enable compilation of the game" ON)
option(ENABLE_CAMPAIGN_SERVER "Enable compilation of campaign server")
option(ENABLE_SERVER "Enable compilation of server" ON)
option(ENABLE_EDITOR "Enable compilation of map editor")
option(ENABLE_EDITOR2 "Enable compilation of the new map editor into the game")
option(ENABLE_TOOLS "Enable building and installation of tools for artists and WML maintainers")
option(ENABLE_TESTS "Build unit tests")
option(ENABLE_NLS "Enable building of tranlations" ON)

View file

@ -283,11 +283,35 @@ SET(wesnoth-main_SRC
widgets/scrollpane.cpp
)
# used with editor2 option in the wesnoth target
IF(ENABLE_EDITOR2)
SET(wesnoth-editor2_SRC
editor2/editor_main.cpp
editor/editor.cpp
editor/editor_layout.cpp
editor/map_manip.cpp
editor/editor_display.cpp
editor/editor_palettes.cpp
editor/editor_dialogs.cpp
editor/editor_undo.cpp
)
SET(wesnoth_SRC
game.cpp
${wesnoth-main_SRC}
${wesnoth-editor2_SRC}
)
ELSE(ENABLE_EDITOR2)
SET(wesnoth_SRC
game.cpp
${wesnoth-main_SRC}
)
ENDIF(ENABLE_EDITOR2)
add_executable(wesnoth ${wesnoth_SRC})
target_link_libraries(wesnoth wesnoth-core wesnoth-game ${game-external-libs})
set_target_properties(wesnoth PROPERTIES OUTPUT_NAME ${BINARY_PREFIX}wesnoth${BINARY_SUFFIX})