forked from Ableton/link
-
Notifications
You must be signed in to change notification settings - Fork 1
/
AbletonLinkConfig.cmake
50 lines (44 loc) · 1.27 KB
/
AbletonLinkConfig.cmake
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
if(CMAKE_VERSION VERSION_LESS 3.0)
message(FATAL_ERROR "CMake 3.0 or greater is required")
endif()
add_library(Ableton::Link IMPORTED INTERFACE)
set_property(TARGET Ableton::Link APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES
${CMAKE_CURRENT_LIST_DIR}/include
)
# Force C++11 support for consuming targets
set_property(TARGET Ableton::Link APPEND PROPERTY
INTERFACE_COMPILE_FEATURES
cxx_generalized_initializers
)
if(UNIX)
set_property(TARGET Ableton::Link APPEND PROPERTY
INTERFACE_COMPILE_DEFINITIONS
LINK_PLATFORM_UNIX=1
)
endif()
if(APPLE)
set_property(TARGET Ableton::Link APPEND PROPERTY
INTERFACE_COMPILE_DEFINITIONS
LINK_PLATFORM_MACOSX=1
)
elseif(WIN32)
set_property(TARGET Ableton::Link APPEND PROPERTY
INTERFACE_COMPILE_DEFINITIONS
LINK_PLATFORM_WINDOWS=1
)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set_property(TARGET Ableton::Link APPEND PROPERTY
INTERFACE_COMPILE_DEFINITIONS
LINK_PLATFORM_LINUX=1
)
endif()
include(${CMAKE_CURRENT_LIST_DIR}/cmake_include/AsioStandaloneConfig.cmake)
set_property(TARGET Ableton::Link APPEND PROPERTY
INTERFACE_LINK_LIBRARIES
AsioStandalone::AsioStandalone
)
set_property(TARGET Ableton::Link APPEND PROPERTY
INTERFACE_SOURCES
${CMAKE_CURRENT_LIST_DIR}/include/ableton/Link.hpp
)