-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
86 lines (70 loc) · 2.13 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
cmake_minimum_required(VERSION 3.5)
project(DentalAnalyzer LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CGAL_DIR "C:/dev/CGAL-5.1.1")
set(GMP_LIBRARIES "C:/dev/CGAL-5.1.1/auxiliary/gmp/lib/libgmp-10.lib")
set(GMP_INCLUDE_DIR "C:/dev/CGAL-5.1.1/auxiliary/gmp/include")
set(MPFR_LIBRARIES "C:/dev/CGAL-5.1.1/auxiliary/gmp/lib/libmpfr-4.lib")
set(MPFR_INCLUDE_DIR "C:/dev/CGAL-5.1.1/auxiliary/gmp/include")
set(Boost_INCLUDE_DIR "C:/dev/boost_1_75_0")
set(Boost_DIR "C:/dev/boost_1_75_0/stage/lib/cmake/Boost-1.75.0")
set(Boost_DEBUG OFF)
set(CGAL_Boost_USE_STATIC_LIBS ON)
set(CMAKE_BUILD_TYPE "Release")
find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets Multimedia REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets Multimedia REQUIRED)
# CGAL and its components
find_package( CGAL COMPONENTS )
if ( NOT CGAL_FOUND )
message(STATUS "This project requires the CGAL library, and will not be compiled.")
return()
endif()
set(CGAL_libs CGAL::CGAL)
#
# Boost and its components
find_package(Boost REQUIRED COMPONENTS
thread
filesystem
system
program_options
date_time
chrono)
if ( NOT Boost_FOUND )
message(STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
set(PROJECT_SOURCES
main.cpp
mainwindow.cpp
mainwindow.h
mainwindow.ui
Analyzer.cpp
Analyzer.h
objects.h
utility.cpp
utility.h
result.h
parameter.h
result.cpp
)
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
qt_add_executable(DentalAnalyzer
${PROJECT_SOURCES}
)
else()
if(ANDROID)
add_library(DentalAnalyzer SHARED
${PROJECT_SOURCES}
)
else()
add_executable(DentalAnalyzer
${PROJECT_SOURCES}
)
endif()
endif()
target_link_libraries(DentalAnalyzer PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Multimedia ${CGAL_libs})