summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-02-12 16:53:30 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-02-12 16:53:30 -0500
commit3df19e45e737a1b9395a9a258e3263e444ebedd7 (patch)
tree896adccf14054cf54291c1d5bc7825a8888a351b
parent5cc80ec58ea5bd66456f6f5286fa5f26d3fe702b (diff)
parentbc63fa57ced1c7329f7fdcfd168eaf7e290158bc (diff)
downloadtherapy-3df19e45e737a1b9395a9a258e3263e444ebedd7.tar.gz
therapy-3df19e45e737a1b9395a9a258e3263e444ebedd7.tar.bz2
therapy-3df19e45e737a1b9395a9a258e3263e444ebedd7.zip
Merge branch 'master' into es-rewrite
-rw-r--r--CMakeLists.txt34
-rw-r--r--cmake/FindMxml.cmake31
-rw-r--r--tools/mapedit/CMakeLists.txt27
-rw-r--r--tools/mapedit/src/frame.cpp1
4 files changed, 17 insertions, 76 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 39b1bbc..8b6ba2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -1,32 +1,18 @@
1cmake_minimum_required(VERSION 2.6) 1cmake_minimum_required (VERSION 3.1)
2project(Aromatherapy) 2project (Aromatherapy)
3 3
4# Use our modified FindSDL2* modules 4set(CMAKE_BUILD_TYPE Debug)
5
6# Set directory to look for package helpers.
5set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${Aromatherapy_SOURCE_DIR}/cmake") 7set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${Aromatherapy_SOURCE_DIR}/cmake")
6# Set an output directory for our binaries
7set(BIN_DIR ${Aromatherapy_SOURCE_DIR}/bin)
8 8
9# Bump up warning levels appropriately for clang, gcc & msvc 9# Get dependencies.
10# Also set debug/optimization flags depending on the build type. IDE users choose this when
11# selecting the build mode in their IDE
12if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
13 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -std=c++11")
14 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} -g")
15 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -O2")
16elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
17 if (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
18 string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
19 else()
20 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
21 endif()
22endif()
23 10
24find_package(PkgConfig) 11find_package(PkgConfig)
12pkg_check_modules(GLFW REQUIRED glfw3)
25 13
26# Look up SDL2 and add the include directory to our include path
27find_package(OpenGL REQUIRED) 14find_package(OpenGL REQUIRED)
28find_package(GLEW REQUIRED) 15find_package(GLEW REQUIRED)
29pkg_check_modules(GLFW REQUIRED glfw3)
30find_package(portaudio REQUIRED) 16find_package(portaudio REQUIRED)
31find_package(libsndfile REQUIRED) 17find_package(libsndfile REQUIRED)
32find_package(libxml2 REQUIRED) 18find_package(libxml2 REQUIRED)
@@ -52,8 +38,6 @@ link_directories(
52 ${GLFW_LIBRARY_DIRS} 38 ${GLFW_LIBRARY_DIRS}
53) 39)
54 40
55# include_directories(${SDL2_INCLUDE_DIR})
56set(CMAKE_BUILD_TYPE Debug)
57add_executable(Aromatherapy 41add_executable(Aromatherapy
58 src/main.cpp 42 src/main.cpp
59 src/renderer.cpp 43 src/renderer.cpp
@@ -68,5 +52,7 @@ add_executable(Aromatherapy
68 src/systems/mapping.cpp 52 src/systems/mapping.cpp
69 src/systems/orienting.cpp 53 src/systems/orienting.cpp
70) 54)
55
56set_property(TARGET Aromatherapy PROPERTY CXX_STANDARD 11)
57set_property(TARGET Aromatherapy PROPERTY CXX_STANDARD_REQUIRED ON)
71target_link_libraries(Aromatherapy ${ALL_LIBS}) 58target_link_libraries(Aromatherapy ${ALL_LIBS})
72install(TARGETS Aromatherapy RUNTIME DESTINATION ${BIN_DIR})
diff --git a/cmake/FindMxml.cmake b/cmake/FindMxml.cmake deleted file mode 100644 index 49daa4f..0000000 --- a/cmake/FindMxml.cmake +++ /dev/null
@@ -1,31 +0,0 @@
1# - Try to find Motif (or lesstif)
2# Once done this will define:
3# MXML_FOUND - system has MXML
4# MXML_INCLUDE_DIR - incude paths to use Motif
5# MXML_LIBRARIES - Link these to use Motif
6
7SET(MXML_FOUND 0)
8
9IF(UNIX)
10 FIND_PATH(MXML_INCLUDE_DIR
11 mxml.h
12 /usr/include
13 )
14
15 FIND_LIBRARY(MXML_LIBRARIES
16 mxml
17 /usr/lib
18 )
19
20ENDIF(UNIX)
21
22# handle the QUIETLY and REQUIRED arguments and set MXML_FOUND to TRUE if
23# all listed variables are TRUE
24INCLUDE(FindPackageHandleStandardArgs)
25FIND_PACKAGE_HANDLE_STANDARD_ARGS(MXML DEFAULT_MSG MXML_LIBRARIES MXML_INCLUDE_DIR)
26
27
28MARK_AS_ADVANCED(
29 MXML_INCLUDE_DIR
30 MXML_LIBRARIES
31) \ No newline at end of file
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 @@
1cmake_minimum_required(VERSION 2.6) 1cmake_minimum_required (VERSION 3.1)
2project(AromatherapyMapEditor) 2project (AromatherapyMapEditor)
3 3
4# Set directory to look for package helpers.
4set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${AromatherapyMapEditor_SOURCE_DIR}/cmake") 5set(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 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
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 -O0")
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) 7find_package(wxWidgets REQUIRED core base)
25include(${wxWidgets_USE_FILE}) 8include(${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
35set_property(TARGET AromatherapyMapEditor PROPERTY CXX_STANDARD 11)
36set_property(TARGET AromatherapyMapEditor PROPERTY CXX_STANDARD_REQUIRED ON)
51target_link_libraries(AromatherapyMapEditor ${ALL_LIBS}) 37target_link_libraries(AromatherapyMapEditor ${ALL_LIBS})
52install(TARGETS AromatherapyMapEditor RUNTIME DESTINATION ${BIN_DIR})
diff --git a/tools/mapedit/src/frame.cpp b/tools/mapedit/src/frame.cpp index aad3294..7112102 100644 --- a/tools/mapedit/src/frame.cpp +++ b/tools/mapedit/src/frame.cpp
@@ -15,6 +15,7 @@
15static std::list<wxWindow*> openWindows; 15static std::list<wxWindow*> openWindows;
16 16
17enum { 17enum {
18 IGNORE,
18 MENU_VIEW_ZOOM_IN, 19 MENU_VIEW_ZOOM_IN,
19 MENU_VIEW_ZOOM_OUT, 20 MENU_VIEW_ZOOM_OUT,
20 MENU_FILE_NEW, 21 MENU_FILE_NEW,