forked from ocornut/imgui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dependencies.cmake
38 lines (28 loc) · 1.09 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
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(GLFW REQUIRED)
INCLUDE_DIRECTORIES(${GLFW_INCLUDE_DIRS})
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 -fno-builtin -O3 -ffat-lto-objects -flto")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -ffat-lto-objects -flto")