-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
31 lines (23 loc) · 1.04 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
project ( EVENTSYSTEM )
cmake_minimum_required ( VERSION 2.6 )
# Output compiled files in root directory
set ( LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/.. )
set ( EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/.. )
# Use C++11 standard
if ( CMAKE_CXX_COMPILER MATCHES ".*clang" )
set ( CMAKE_COMPILER_IS_CLANG )
endif ( CMAKE_CXX_COMPILER MATCHES ".*clang" )
if ( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG )
list ( APPEND CMAKE_CXX_FLAGS "-std=c++11" )
endif ( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )
set ( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O1" )
# Include headers from inc
include_directories ( ${CMAKE_SOURCE_DIR}/inc )
set ( COMPILE_TESTS OFF CACHE COMPILE_TESTS "Compile test_executable" )
# Add the test subdirectory
if ( COMPILE_TESTS )
add_subdirectory ( ${CMAKE_SOURCE_DIR}/tests )
endif ( COMPILE_TESTS )
file ( GLOB_RECURSE EVENTSYSTEM_HEADERS ${CMAKE_SOURCE_DIR}/inc *.(h|hpp) )
install ( FILES ${EVENTSYSTEM_HEADERS} DESTINATION include )