-
Notifications
You must be signed in to change notification settings - Fork 234
/
CMakeLists.txt
42 lines (32 loc) · 1.11 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
cmake_minimum_required(VERSION 3.10.1)
project(trojan-qt5)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt5 5.13 COMPONENTS Core Gui Network Widgets REQUIRED)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(DEFINED ENV{_TROJAN_QT5_BUILD_INFO_})
set(_TROJAN_QT5_BUILD_INFO_STR_ "$ENV{_TROJAN_QT5_BUILD_INFO_STR_}")
else()
set(_TROJAN_QT5_BUILD_INFO_STR_ "Trojan-Qt5 build from local machine")
endif()
add_definitions(-D_TROJAN_QT5_BUILD_INFO_STR_="${_TROJAN_QT5_BUILD_INFO_STR_}")
set(TROJAN-QT5_SOURCES
)
if(WIN32)
add_definitions(-D_WIN32_WINNT=0x600)
target_link_libraries(${PROJECT_NAME} wsock32 ws2_32 userenv iphlpapi)
target_link_libraries(${PROJECT_NAME} Crypt32 kernel32 psapi user32)
add_definitions(-DWIN32_LEAN_AND_MEAN)
endif()
if(APPLE)
find_library(COCOA NAMES Cocoa)
find_library(SECURITY NAMES Security)
find_library(APPKIT NAMES AppKit)
find_library(CARBON NAMES Carbon)
find_library(FOUNDATION NAMES Foundation)
endif()
if(UNIX AND NOT APPLE AND NOT WIN32)
find_package(Qt5 5.13 COMPONENTS dbus REQUIRED)
endif()