-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
36 lines (26 loc) · 922 Bytes
/
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
cmake_minimum_required(VERSION 3.14)
project(QMamehook LANGUAGES CXX)
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(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core)
add_executable(QMamehook
main.cpp
qhookermain.h qhookermain.cpp
# ico.qrc
)
target_link_libraries(QMamehook PRIVATE Qt${QT_VERSION_MAJOR}::Core)
# TCP
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Network)
target_link_libraries(QMamehook PRIVATE Qt${QT_VERSION_MAJOR}::Network)
# Serial Port
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS SerialPort)
target_link_libraries(QMamehook PRIVATE Qt${QT_VERSION_MAJOR}::SerialPort)
include(GNUInstallDirs)
install(TARGETS QMamehook
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)