-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
51 lines (39 loc) · 1.11 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
42
43
44
45
46
47
48
49
50
51
cmake_minimum_required(VERSION 2.8)
if(POLICY CMP0043)
cmake_policy(SET CMP0043 OLD)
endif()
option(TESTS "build tests" ON)
option(VIEWERS "build viewers" ON)
option(SAMPLES "build samples" ON)
option(D2D_RENDERER "enable Direct2D renderer" OFF)
option(CAIRO_RENDERER "enable Cairo renderer" OFF)
if(CAIRO_RENDERER)
if(UNIX)
if(NOT CAIRO_LIB)
# default name in system lib paths
set(CAIRO_LIB "cairo")
endif()
endif()
include_directories(${CAIRO_INCLUDE})
endif()
find_package(wxWidgets COMPONENTS xrc html adv core xml base REQUIRED)
include("${wxWidgets_USE_FILE}")
if(${wxWidgets_VERSION_MAJOR} EQUAL "2")
message(FATAL_ERROR "not supported wxWidgets version ${wxWidgets_VERSION_STRING}, required 3.x")
endif()
if(${CMAKE_COMPILER_IS_GNUCXX})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -Wall")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4514 /wd4251 /wd4275")
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
add_subdirectory(src/lib)
if(${VIEWERS})
add_subdirectory(src/viewers)
endif()
if(${SAMPLES})
add_subdirectory(samples)
endif()
if(${TESTS})
add_subdirectory(tests)
endif()