-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
61 lines (45 loc) · 1.37 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
cmake_minimum_required(VERSION 3.30)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# cmake_policy(SET CMP0091 NEW)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
project(minitoolsets CXX)
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
add_compile_options(-foptimize-sibling-calls)
endif()
if (MSVC)
add_link_options(/NODEFAULTLIB:libucrt$<$<CONFIG:Debug>:d>.lib)
link_libraries(ucrt$<$<CONFIG:Debug>:d>.lib)
endif(MSVC)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets )
qt_standard_project_setup()
include_directories(include)
include_directories(src)
include_directories(libs/qtcoro)
qt_add_executable(edatool
src/mainwindow.ui
src/R_select_window.ui
src/I_Calc.ui
src/R_select_window.hpp
src/mainwindow.hpp
src/I_Calc.hpp
src/R_select_window.cpp
src/mainwindow.cpp
src/I_Calc.cpp
src/main.cpp
src/R_gen.cpp
)
target_link_libraries(edatool PRIVATE Qt6::Widgets)
if (MSVC)
target_link_options(edatool PRIVATE "/NODEFAULTLIB")
target_link_libraries(edatool PRIVATE ucrt$<$<CONFIG:Debug>:d>.lib msvcrt.lib libvcruntime.lib libcpmt$<$<CONFIG:Debug>:d>.lib)
endif()
set_target_properties(edatool PROPERTIES
WIN32_EXECUTABLE ON
MACOSX_BUNDLE ON
)
qt_add_resources(edatool imageresources
PREFIX "/images"
FILES res/dcdc.png res/logo.png
)
install(TARGETS edatool DESTINATION bin)