-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
38 lines (30 loc) · 822 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
38 lines (30 loc) · 822 Bytes
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
cmake_minimum_required(VERSION 3.16)
project(td4cpp VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Find Qt6 components
find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
# Enable Qt's automatic handling of UIC, MOC, and RCC
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
# Set the UI files directory
set(CMAKE_AUTOUIC_SEARCH_PATHS ui)
# Add executable
add_executable(td4cpp
src/main.cpp
src/mainwindow.cpp
src/mainwindow.h
src/calculator.cpp
src/calculator.h
src/vector_operations.cpp
src/vector_operations.h
ui/mainwindow.ui
)
# Link Qt libraries
target_link_libraries(td4cpp Qt6::Core Qt6::Widgets)
# Set target properties
set_target_properties(td4cpp PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)