-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
41 lines (28 loc) · 1 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
32
33
34
35
36
37
38
39
40
41
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
set(EXE_NAME graphicsDemo)
if(NOT DEFINED CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Build type")
endif()
project(demos CXX)
set(CMAKE_CXX_STANDARD 14)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(WINDOW_DEMO_LIBRARIES "")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
find_package(SFML REQUIRED COMPONENTS network system graphics audio window)
include_directories(${SFML_INCLUDE_DIR})
list(APPEND WINDOW_DEMO_LIBRARIES ${SFML_LIBRARIES})
find_package(Catch REQUIRED)
list(APPEND WINDOW_DEMO_LIBRARIES ${CATCH_INCLUDE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
add_definitions("-Wall")
endif ()
add_subdirectory(source)
#### UNIT TESTING ####
include_directories(${WINDOW_DEMO_LIBRARIES})
enable_testing()
add_subdirectory(tests)
if (CMAKE_VERSION VERSION_GREATER 2.8.5)
include(FeatureSummary)
feature_summary(WHAT ALL)
endif ()