-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
77 lines (66 loc) · 1.79 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
cmake_minimum_required(VERSION 3.16)
project(mesh-inspector
VERSION 1.7
LANGUAGES C CXX)
set(MESH_INSPECTOR_COPYRIGHT
"Copyright © 2022-present, David Andrš, All Rights Reserved"
)
mark_as_advanced(FORCE MESH_INSPECTOR_COPYRIGHT)
math(EXPR MESH_INSPECTOR_MAJOR_VERSION ${PROJECT_VERSION_MAJOR})
math(EXPR MESH_INSPECTOR_MINOR_VERSION ${PROJECT_VERSION_MINOR})
include(CheckIncludeFiles)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 6.4
COMPONENTS
Core
Gui
Widgets
Network
Svg
)
if(Qt6_FOUND)
message(STATUS "Found Qt6: ${Qt6_VERSION_MAJOR}.${Qt6_VERSION_MINOR}.${Qt6_VERSION_PATCH} (found in: ${Qt6_DIR})")
else()
message(FATAL_ERROR "Unable to find the Qt6.")
endif()
find_package(VTK 9.3.0...<9.4.0
COMPONENTS
CommonCore
FiltersGeneric
FiltersExtraction
FiltersHybrid
FiltersVerdict
GUISupportQt
InteractionStyle
RenderingAnnotation
RenderingContextOpenGL2
RenderingCore
RenderingFreeType
RenderingGL2PSOpenGL2
RenderingOpenGL2
RenderingQt
IOExodus
IOGeometry
IOImage
IOLegacy
IOXML
IOExportGL2PS
)
if(VTK_FOUND)
message(STATUS "Found VTK: ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION} (found in: ${VTK_DIR})")
else()
message(FATAL_ERROR "Unable to find the VTK build folder.")
endif()
if(NOT(TARGET VTK::GUISupportQt))
message(FATAL_ERROR "VTK not built with Qt support.")
endif()
CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H)
add_subdirectory(contrib/fmt)
add_subdirectory(contrib/gmshparsercpp)
add_subdirectory(common)
add_subdirectory(src)