summary refs log tree commit diff stats
path: root/tools/mapedit/CMakeLists.txt
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2015-03-14 21:02:01 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-03-14 21:02:01 -0400
commitb563953a4846bab720cae17ef4ab5a8296730c7c (patch)
treee585bda1e4a8b979c8864cd25a84f663122c83b7 /tools/mapedit/CMakeLists.txt
parent6b1dcc5df51df4a2d8b724187eb1bcdb4fd9df8b (diff)
downloadtherapy-b563953a4846bab720cae17ef4ab5a8296730c7c.tar.gz
therapy-b563953a4846bab720cae17ef4ab5a8296730c7c.tar.bz2
therapy-b563953a4846bab720cae17ef4ab5a8296730c7c.zip
Started writing map editor
Diffstat (limited to 'tools/mapedit/CMakeLists.txt')
-rw-r--r--tools/mapedit/CMakeLists.txt45
1 files changed, 45 insertions, 0 deletions
diff --git a/tools/mapedit/CMakeLists.txt b/tools/mapedit/CMakeLists.txt new file mode 100644 index 0000000..9a024c8 --- /dev/null +++ b/tools/mapedit/CMakeLists.txt
@@ -0,0 +1,45 @@
1cmake_minimum_required(VERSION 2.6)
2project(AromatherapyMapEditor)
3
4set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${AromatherapyMapEditor_SOURCE_DIR}/cmake")
5# Set an output directory for our binaries
6set(BIN_DIR ${AromatherapyMapEditor_SOURCE_DIR}/bin)
7
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
11if (${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")
14 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -O2")
15elseif (${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()
21endif()
22
23# Look up SDL2 and add the include directory to our include path
24find_package(wxWidgets REQUIRED core base)
25include(${wxWidgets_USE_FILE})
26
27find_package(libxml2 REQUIRED)
28
29set(ALL_LIBS
30 ${wxWidgets_LIBRARIES}
31 ${LIBXML2_LIBRARIES}
32)
33
34include_directories(
35 ${LIBXML2_INCLUDE_DIR}
36 src
37)
38
39set(CMAKE_BUILD_TYPE Debug)
40add_executable(AromatherapyMapEditor
41 src/main.cpp
42 src/map.cpp
43)
44target_link_libraries(AromatherapyMapEditor ${ALL_LIBS})
45install(TARGETS AromatherapyMapEditor RUNTIME DESTINATION ${BIN_DIR})