blob: 2a713429b0e252d8606de55ba3f0a9f76cb76dc9 (
plain)
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
62
63
64
65
|
#
# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
# Copyright (C) 2008-2019 TrinityCore <https://www.trinitycore.org/>
#
# An interface library to make the target com available to other targets
add_library(acore-compile-option-interface INTERFACE)
# Use -std=c++11 instead of -std=gnu++11
set(CXX_EXTENSIONS OFF)
if (USE_CPP_20)
# Enable support С++20
set(CMAKE_CXX_STANDARD 20)
message(STATUS "Enabled С++20 standard")
else()
# Enable support С++17
set(CMAKE_CXX_STANDARD 17)
message(STATUS "Enabled С++17 standard")
endif()
# An interface library to make the warnings level available to other targets
# This interface taget is set-up through the platform specific script
add_library(acore-warning-interface INTERFACE)
# An interface used for all other interfaces
add_library(acore-default-interface INTERFACE)
target_link_libraries(acore-default-interface
INTERFACE
acore-compile-option-interface)
# An interface used for silencing all warnings
add_library(acore-no-warning-interface INTERFACE)
if (MSVC)
target_compile_options(acore-no-warning-interface
INTERFACE
/W0)
else()
target_compile_options(acore-no-warning-interface
INTERFACE
-w)
endif()
# An interface library to change the default behaviour
# to hide symbols automatically.
add_library(acore-hidden-symbols-interface INTERFACE)
# An interface amalgamation which provides the flags and definitions
# used by the dependency targets.
add_library(acore-dependency-interface INTERFACE)
target_link_libraries(acore-dependency-interface
INTERFACE
acore-default-interface
acore-no-warning-interface
acore-hidden-symbols-interface)
# An interface amalgamation which provides the flags and definitions
# used by the core targets.
add_library(acore-core-interface INTERFACE)
target_link_libraries(acore-core-interface
INTERFACE
acore-default-interface
acore-warning-interface)
|