generated from celtera/avendish-audio-processor-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
101 lines (81 loc) · 2.38 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
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
project(Ultraleap)
set(CMAKE_CXX_STANDARD 23)
set(AVND_DISABLE_AUTOMAXREF ON CACHE "" INTERNAL)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
include(dependencies.cmake)
include_directories(${concurrentqueue_SOURCE_DIR})
include_directories(${MAXSDK_MAX_INCLUDE_DIR})
include_directories(${MAXSDK_MSP_INCLUDE_DIR})
## Creating the external ##
# Create a target for our base library
add_library(UltraLeap_base STATIC
src/Model.cpp
src/Model.hpp
src/Leap.hpp
src/TripleBuffer.hpp
)
set_target_properties(UltraLeap_base PROPERTIES
PREFIX "prefix_bind_"
IMPORT_PREFIX "import_bind_"
)
target_link_libraries(UltraLeap_base PUBLIC
Avendish::Avendish
Boost::boost
LeapC::Leap
)
set(BACKENDS_TO_BUILD "dump")
if(WIN32 OR APPLE)
list(APPEND BACKENDS_TO_BUILD "max")
endif()
if(NOT MSVC)
list(APPEND BACKENDS_TO_BUILD "pd")
endif()
avnd_make(
TARGET UltraLeap_base
MAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/src/Model.hpp"
MAIN_CLASS ul::UltraLeap
C_NAME ultraleap
BACKENDS "${BACKENDS_TO_BUILD}"
)
## Packaging ##
if(MSVC)
return()
endif()
set(FILES_TO_INSTALL "${LEAPC_RUNTIME}")
if(WIN32 AND NOT MSVC)
get_filename_component(cxx_path "${CMAKE_CXX_COMPILER}" PATH)
set(FILES_TO_INSTALL
${FILES_TO_INSTALL}
"${cxx_path}/libc++.dll"
"${cxx_path}/libunwind.dll"
)
endif()
# Create a Max package
if(MAX_PACKAGE_FOLDER AND TARGET UltraLeap_base_max)
avnd_create_max_package(
CODESIGN
NOTARIZE
NAME UltraLeap
SOURCE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/max/package"
PACKAGE_ROOT "${MAX_PACKAGE_FOLDER}"
KEYCHAIN_FILE "$ENV{MAC_CODESIGN_KEYCHAIN}"
KEYCHAIN_PASSWORD "$ENV{MAC_CODESIGN_KEYCHAIN_PASSWORD}"
CODESIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/src/entitlements.plist"
CODESIGN_IDENTITY "$ENV{MAC_CODESIGN_IDENTITY}"
NOTARIZE_TEAM "$ENV{MAC_CODESIGN_TEAM}"
NOTARIZE_EMAIL "$ENV{MAC_CODESIGN_EMAIL}"
NOTARIZE_PASSWORD "$ENV{MAC_NOTARIZE_PASSWORD}"
EXTERNALS UltraLeap_base_max
SUPPORT "${FILES_TO_INSTALL}"
)
endif()
if(PD_PACKAGE_FOLDER AND TARGET UltraLeap_base_pd)
avnd_create_pd_package(
NAME UltraLeap
SOURCE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pd/"
PACKAGE_ROOT "${PD_PACKAGE_FOLDER}"
EXTERNALS UltraLeap_base_pd
SUPPORT "${FILES_TO_INSTALL}"
)
endif()