forked from pyzhangxiang/qt-curve-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
35 lines (26 loc) · 908 Bytes
/
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
cmake_minimum_required(VERSION 2.8.12)
set(MY_PROJECT_NAME qtCurveEditor)
PROJECT(${MY_PROJECT_NAME})
set(MY_CMAKE_CONFIG ${CMAKE_CURRENT_SOURCE_DIR}/cmake_config)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${MY_CMAKE_CONFIG})
include(utility)
# find opengl and directx
find_package(OpenGL)
if(OPENGL_FOUND)
message("OPENGL FOUND\n${OPENGL_INCLUDE_DIR}\n" )
else(OPENGL_FOUND)
# create project failed
message(FATAL_ERROR "OPENGL NOT FOUND")
endif(OPENGL_FOUND)
########### Find QT5 packages ###########
FIND_PACKAGE(Qt5Core REQUIRED)
FIND_PACKAGE(Qt5Gui REQUIRED)
FIND_PACKAGE(Qt5OpenGL REQUIRED)
FIND_PACKAGE(Qt5Widgets REQUIRED)
# Tell CMake to run moc when necessary:
set(CMAKE_AUTOMOC ON)
# As moc files are generated in the binary dir, tell CMake to always look for includes there:
set(CMAKE_INCLUDE_CURRENT_DIR ON)
#enable all warnings
add_definitions(-Wall)
add_subdirectory(src)