From 2b285a5af2ce3b31e6cddd00b4ce36c74475eb8e Mon Sep 17 00:00:00 2001 From: Nils Kneuper Date: Wed, 18 Jun 2008 19:06:09 +0000 Subject: [PATCH] add building of EDITOR2 to cmake recipe --- CMakeLists.txt | 1 + src/CMakeLists.txt | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index dfeb044a1ed..76d528d08eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 595bb0793cc..36d3774a282 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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})