forked from AttorneyOnline/AO2-Client
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
49 lines (39 loc) · 1.44 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
# Configure cmake
cmake_minimum_required(VERSION 3.1.0)
cmake_policy(SET CMP0076 NEW) # silence warning
project(AttorneyOnline)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(CMAKE_VERSION VERSION_LESS "3.7.0")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
endif()
# AO
add_executable(Attorney_Online resources.qrc)
# WIN32
if(WIN32)
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set_property(TARGET Attorney_Online PROPERTY WIN32_EXECUTABLE true)
set(APP_ICON_RESOURCE_WINDOWS "${CMAKE_CURRENT_SOURCE_DIR}/resource/logo_ao2.rc")
target_sources(Attorney_Online PRIVATE ${APP_ICON_RESOURCE_WINDOWS})
endif()
endif()
# Target Include
target_include_directories(Attorney_Online PRIVATE include)
# Target Lib
find_package(Qt5 COMPONENTS Core Gui Network Widgets Concurrent WebSockets REQUIRED)
target_link_directories(Attorney_Online PRIVATE lib)
target_link_libraries(Attorney_Online PRIVATE Qt5::Core Qt5::Gui Qt5::Network Qt5::Widgets Qt5::Concurrent
Qt5::WebSockets bass bassmidi bassopus discord-rpc)
target_compile_definitions(Attorney_Online PRIVATE DISCORD)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
target_link_libraries(Attorney_Online PRIVATE "-framework CoreFoundation" "-framework Foundation" "-framework CoreServices")
endif()
# Subdirectories
if (AO_BUILD_TESTS)
add_subdirectory(test)
endif()
add_subdirectory(src)
add_subdirectory(include)