-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
53 lines (42 loc) · 1.12 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
cmake_minimum_required(VERSION 3.16)
# Sets project name
project(projects_raster LANGUAGES CXX C)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
# Sets C++ standard
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Specifies required Qt components
find_package(Qt6 REQUIRED COMPONENTS Core)
find_package(Qt6 REQUIRED COMPONENTS Widgets)
find_package(Qt6 REQUIRED COMPONENTS Gui)
# Specifies required Qt components
add_definitions(-D_USE_MATH_DEFINES)
add_definitions(-DTIXML_USE_STL)
# Specifies .cpp and .h files to be passed to the compiler
add_executable(${PROJECT_NAME}
main.cpp
mainwindow.cpp
settings.cpp
canvas2d.cpp
mainwindow.h
settings.h
canvas2d.h
rgba.h
)
# Specifies libraries to be linked (Qt components, glew, etc)
target_link_libraries(${PROJECT_NAME} PRIVATE
Qt::Core
Qt::Widgets
Qt::Gui
)
# Set this flag to silence warnings on Windows
if (MSVC OR MSYS OR MINGW)
set(CMAKE_CXX_FLAGS "-Wno-volatile")
endif()
# Set this flag to silence warnings on MacOS
if (APPLE)
set(CMAKE_CXX_FLAGS "-Wno-deprecated-volatile")
endif()