-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
53 lines (37 loc) · 1.83 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
project(qglgui)
INCLUDE(CPack)
cmake_minimum_required(VERSION 2.8.9)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake/modules)
set(CMAKE_C_FLAGS_DEBUG "-fPIC -DPIC -Wall -Werror -Og -g3 -DDEBUG -DPROFILING_FILENAME_PREFIX=\\\"QGLGUI\\\"")
set(CMAKE_C_FLAGS_RELEASE "-fPIC -DPIC -Wall -Werror -O3 -DNDEBUG -mfpmath=sse,387 -msse2 -msse3 -DPROFILING_FILENAME_PREFIX=\\\"QGLGUI\\\"")
set(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -fPIC -DPIC -Wall -Werror -Og -g3 -DDEBUG -DPROFILING_FILENAME_PREFIX=\\\"QGLGUI\\\"")
set(CMAKE_CXX_FLAGS_RELEASE "-std=c++11 -fPIC -DPIC -Wall -Werror -O3 -DNDEBUG -mfpmath=sse,387 -msse2 -msse3 -DPROFILING_FILENAME_PREFIX=\\\"QGLGUI\\\"")
find_package(OpenGL REQUIRED)
find_package(Qt5Core 5.2 REQUIRED)
find_package(Qt5Gui 5.2 REQUIRED)
find_package(Qt5Widgets 5.2 REQUIRED)
find_package(Qt5Svg 5.2 REQUIRED)
find_package(Qt5FontDatabaseSupport 5.2 REQUIRED)
find_package(Qt5EventDispatcherSupport 5.2 REQUIRED)
find_package(Freetype REQUIRED)
option(QGL_BUILD_SAMPLES "Build sample applications" ON)
option(QGL_ENABLE_PROFILING "Enable profiling" OFF)
option(QGL_ENABLE_GL1_RENDERER "Enable basic GL1 renderer (glBegin/End)" ON)
option(QGL_ENABLE_GL2_RENDERER "Enable basic GL2 renderer (VBO + fixed pipeline)" OFF)
option(QGL_ENABLE_GL3_RENDERER "Enable basic GL3 renderer (VBO + built-in shaders)" OFF)
set(QGL_CPPPROFILER_PATH "." CACHE STRING "Path to libcppprofiler location")
include_directories(${QGL_CPPPROFILER_PATH})
if (QGL_ENABLE_PROFILING)
add_definitions(-DENABLE_PROFILING)
add_subdirectory(libcppprofiler)
set(PROFILER_LIB cppprofiler-static)
endif (QGL_ENABLE_PROFILING)
add_subdirectory(qglgui)
if (QGL_BUILD_SAMPLES)
find_package(glfw3)
if (NOT GLFW3_FOUND)
message(WARNING "GLFW3 not found. Samples will not be build.")
else ()
add_subdirectory(samples)
endif (NOT GLFW3_FOUND)
endif (QGL_BUILD_SAMPLES)