-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
54 lines (40 loc) · 1.6 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
52
53
54
cmake_minimum_required(VERSION 3.0.2)
project(QtOpenGL)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
include_directories(include)
#set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};/Users/enno/Qt/5.10.1/clang_64")
find_package(Qt5Widgets CONFIG REQUIRED)
find_package(Qt5Core CONFIG REQUIRED)
find_package(Qt5Gui CONFIG REQUIRED)
find_package(Qt5OpenGL)
find_package(OpenGL)
find_package(assimp)
find_package(eigen3)
find_package(OpenMP)
set(CMAKE_AUTOMOC_SEARCH_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/src)
set(CMAKE_AUTORCC_SEARCH_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/src)
set(CMAKE_AUTOUIC_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/src" "${CMAKE_CURRENT_SOURCE_DIR}/resources/Forms/")
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_VERBOSE_MAKEFILE True)
file(GLOB SOURCES "src/*.cpp")
file(GLOB INCLUDES "include/*.h")
file(GLOB DYNAMIC_SOURCES "src/dynamics/*.cpp")
file(GLOB DYNAMIC_INCLUDES "include/dynamics/*.h")
#message("DYNAMIC SRC: " ${DYNAMIC_SOURCES})
message("DYNAMIC SRC: " ${STB_IMAGE_FOUND})
set(SOURCES "${SOURCES}" "resources/Forms/ControlWidget.ui")
set(SOURCES "${SOURCES}" "src/ui/DynamicsUiWidget.cpp")
set(SOURCES "${SOURCES}" "${DYNAMIC_SOURCES}")
set(INCLUDES "${INCLUDES}" "${DYNAMIC_INCLUDES}")
message("INCLUDE: " ${INCLUDES})
message("SOURCES: " ${SOURCES})
add_executable(QtOpenGL
${SOURCES}
${INCLUDES}
resources.qrc
)
#target_link_libraries(QtOpenGL Qt5::Widgets assimp)
target_link_libraries(QtOpenGL Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL OpenGL::GL assimp ${OpenMP_CXX_LIBRARIES} OpenMP::OpenMP_CXX)