forked from steinbergmedia/vst3_base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
117 lines (106 loc) · 3.1 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
cmake_minimum_required(VERSION 3.5.0)
project(smtg_base)
add_library(base STATIC
source/baseiids.cpp
source/classfactoryhelpers.h
source/fbuffer.cpp
source/fbuffer.h
source/fcleanup.h
source/fcommandline.h
source/fdebug.cpp
source/fdebug.h
source/fdynlib.cpp
source/fdynlib.h
source/fobject.cpp
source/fobject.h
source/fstreamer.cpp
source/fstreamer.h
source/fstring.cpp
source/fstring.h
source/timer.cpp
source/timer.h
source/updatehandler.cpp
source/updatehandler.h
thread/include/fcondition.h
thread/include/flock.h
thread/source/fcondition.cpp
thread/source/flock.cpp
)
# Additional sources for other usage
if(FULL_BASE)
target_sources(base
PRIVATE
source/basefwd.h
source/classfactory.cpp
source/classfactory.h
source/fbitset.cpp
source/fbitset.h
source/fcontainer.h
source/fcpu.cpp
source/fcpu.h
source/fcriticalperformance.cpp
source/fcriticalperformance.h
source/finitializer.cpp
source/finitializer.h
source/fmemory.cpp
source/fmemory.h
source/fpoint.cpp
source/fpoint.h
source/frect.cpp
source/frect.h
source/fregion.cpp
source/fregion.h
source/fstdmethods.h
source/fstringmethods.h
source/fstringstream.h
source/funknownfactory.h
source/hexbinary.h
source/istreamwrapper.cpp
source/istreamwrapper.h
source/tringbuffer.h
thread/include/fatomic.h
thread/include/forwarddeclarations.h
thread/include/frwlock_generic.h
thread/include/frwlock_macosx.h
thread/include/frwlock_windows.h
thread/include/fthread.h
thread/source/fatomic.cpp
thread/source/fthread.cpp
)
endif(FULL_BASE)
target_include_directories(base
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/..
)
# Compiler switches are PUBLIC and will be populated.
target_compile_options(base
PUBLIC
"$<$<CONFIG:Debug>:-DDEVELOPMENT=1>"
"$<$<CONFIG:Release>:-DRELEASE=1>"
"$<$<CONFIG:RelWithDebInfo>:-DRELEASE=1>"
)
target_compile_features(base
PUBLIC
cxx_std_17
)
if(MSVC)
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /IGNORE:4221")
endif(MSVC)
smtg_target_setup_universal_binary(base)
# iOS target
if(SMTG_MAC AND XCODE AND SMTG_ENABLE_IOS_TARGETS)
get_target_property(BASE_SOURCES base SOURCES)
add_library(base_ios
STATIC
${BASE_SOURCES}
)
smtg_target_set_platform_ios(base_ios)
# Compiler switches are PUBLIC and will be populated.
target_compile_options(base_ios
PUBLIC
"$<$<CONFIG:Debug>:-DDEVELOPMENT=1>"
"$<$<CONFIG:Release>:-DRELEASE=1>"
"$<$<CONFIG:RelWithDebInfo>:-DRELEASE=1>"
)
target_compile_features(base_ios PUBLIC cxx_std_17)
endif(SMTG_MAC AND XCODE AND SMTG_ENABLE_IOS_TARGETS)