-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdependencies.cmake
66 lines (47 loc) · 1.82 KB
/
dependencies.cmake
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FIND_PACKAGE(OpenGL)
if (OPENGL_FOUND)
INCLUDE_DIRECTORIES("${OPENGL_INCLUDE_DIR}")
else()
MESSAGE(FATAL_ERROR "Could not find OpenGL")
endif()
FIND_PACKAGE(GLEW)
if (GLEW_FOUND)
INCLUDE_DIRECTORIES("${GLEW_INCLUDE_DIR}")
else()
MESSAGE(FATAL_ERROR "Could not find GLEW")
endif()
#FIND_PACKAGE(GTK2)
#if (GTK2_FOUND)
# INCLUDE_DIRECTORIES("${GTK2_INCLUDE_DIR}")
#else()
# MESSAGE(FATAL_ERROR "Could not find GTK2")
#endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake-modules/")
FIND_PACKAGE(Pango REQUIRED)
INCLUDE_DIRECTORIES(${Pango_1_0_INCLUDE_DIR})
FIND_PACKAGE(Cairo REQUIRED)
INCLUDE_DIRECTORIES(${CAIRO_INCLUDE_DIRS})
FIND_PACKAGE(PangoCairo REQUIRED)
INCLUDE_DIRECTORIES(${PangoCairo_INCLUDE_DIRS})
FIND_PACKAGE(GLM REQUIRED)
INCLUDE_DIRECTORIES(${GLM_INCLUDE_DIRS})
FIND_PACKAGE(GLFW REQUIRED)
INCLUDE_DIRECTORIES(${GLFW_INCLUDE_DIRS})
FIND_PACKAGE(SOIL REQUIRED)
INCLUDE_DIRECTORIES(${SOIL_INCLUDE_DIR})
FIND_PACKAGE(GLib REQUIRED)
INCLUDE_DIRECTORIES(${GLIB_INCLUDE_DIRS})
FIND_PACKAGE(GObject REQUIRED)
INCLUDE_DIRECTORIES(${GOBJECT_INCLUDE_DIR})
FIND_PACKAGE(PortAudio REQUIRED)
INCLUDE_DIRECTORIES(${PORTAUDIO_INCLUDE_DIRS})
FIND_PACKAGE(Vorbis REQUIRED)
INCLUDE_DIRECTORIES(${VORBIS_INCLUDE_DIRS})
SET(PROJECT_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/../FileUtil)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++14 -Wall -Wpedantic -Wextra -Werror -fno-builtin -Og -g")
#SET(CMAKE_C_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -ffat-lto-objects -flto")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++14 -Wall -Wpedantic -Wextra -Werror -fno-builtin -O3 -ffat-lto-objects -flto -fPIC")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -ffat-lto-objects -flto")