diff options
Diffstat (limited to 'tools/mapedit')
| -rw-r--r-- | tools/mapedit/CMakeLists.txt | 27 |
1 files changed, 6 insertions, 21 deletions
| diff --git a/tools/mapedit/CMakeLists.txt b/tools/mapedit/CMakeLists.txt index b225834..4ce9133 100644 --- a/tools/mapedit/CMakeLists.txt +++ b/tools/mapedit/CMakeLists.txt | |||
| @@ -1,26 +1,9 @@ | |||
| 1 | cmake_minimum_required(VERSION 2.6) | 1 | cmake_minimum_required (VERSION 3.1) |
| 2 | project(AromatherapyMapEditor) | 2 | project (AromatherapyMapEditor) |
| 3 | 3 | ||
| 4 | # Set directory to look for package helpers. | ||
| 4 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${AromatherapyMapEditor_SOURCE_DIR}/cmake") | 5 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${AromatherapyMapEditor_SOURCE_DIR}/cmake") |
| 5 | # Set an output directory for our binaries | ||
| 6 | set(BIN_DIR ${AromatherapyMapEditor_SOURCE_DIR}/bin) | ||
| 7 | 6 | ||
| 8 | # Bump up warning levels appropriately for clang, gcc & msvc | ||
| 9 | # Also set debug/optimization flags depending on the build type. IDE users choose this when | ||
| 10 | # selecting the build mode in their IDE | ||
| 11 | if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") | ||
| 12 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -std=c++11") | ||
| 13 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} -g -O0") | ||
| 14 | set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -O2") | ||
| 15 | elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC") | ||
| 16 | if (CMAKE_CXX_FLAGS MATCHES "/W[0-4]") | ||
| 17 | string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") | ||
| 18 | else() | ||
| 19 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") | ||
| 20 | endif() | ||
| 21 | endif() | ||
| 22 | |||
| 23 | # Look up SDL2 and add the include directory to our include path | ||
| 24 | find_package(wxWidgets REQUIRED core base) | 7 | find_package(wxWidgets REQUIRED core base) |
| 25 | include(${wxWidgets_USE_FILE}) | 8 | include(${wxWidgets_USE_FILE}) |
| 26 | 9 | ||
| @@ -48,5 +31,7 @@ add_executable(AromatherapyMapEditor | |||
| 48 | src/undo.cpp | 31 | src/undo.cpp |
| 49 | src/mapselect_combo.cpp | 32 | src/mapselect_combo.cpp |
| 50 | ) | 33 | ) |
| 34 | |||
| 35 | set_property(TARGET AromatherapyMapEditor PROPERTY CXX_STANDARD 11) | ||
| 36 | set_property(TARGET AromatherapyMapEditor PROPERTY CXX_STANDARD_REQUIRED ON) | ||
| 51 | target_link_libraries(AromatherapyMapEditor ${ALL_LIBS}) | 37 | target_link_libraries(AromatherapyMapEditor ${ALL_LIBS}) |
| 52 | install(TARGETS AromatherapyMapEditor RUNTIME DESTINATION ${BIN_DIR}) | ||
