forked from libmapper/libmapper-max
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
42 lines (34 loc) · 1.6 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
cmake_minimum_required(VERSION 3.19)
set(BUILD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/build")
if (CMAKE_GENERATOR MATCHES "Visual Studio")
set(LIBMAPPER_DIR "${BUILD_DIR}/libmapper/libmapper-main")
set(LIBMAPPER_BUILD_DIR "${LIBMAPPER_DIR}/build/Release")
set(LIBLO_DIR "${LIBMAPPER_DIR}/build/liblo/liblo-master")
set(LIBLO_BUILD_DIR "${LIBLO_DIR}/cmake/build/Release")
set(LIBLO_INCLUDES "${LIBLO_DIR}/cmake/build;${LIBLO_DIR}")
set(Liblo_LIB ${LIBLO_BUILD_DIR}/liblo.lib)
set(Libmapper_LIB ${LIBMAPPER_BUILD_DIR}/libmapper.lib)
set(LIBMAPPER_INCLUDES ${LIBMAPPER_DIR}/include)
set(MAX_SDK_DIR "${BUILD_DIR}/max-sdk/max-sdk/source/max-sdk-base")
else()
set(LIBMAPPER_INCLUDES "${BUILD_DIR}/inst/include")
set(LIBLO_INCLUDES "${BUILD_DIR}/inst/include")
set(Liblo_LIB ${BUILD_DIR}/inst/lib/liblo.dylib)
set(Libmapper_LIB ${BUILD_DIR}/inst/lib/libmapper.dylib)
set(MAX_SDK_DIR "${BUILD_DIR}/max-sdk/source/max-sdk-base")
endif()
set(C74_SUPPORT_DIR "${MAX_SDK_DIR}/c74support")
project(mapper-max-pd-externals)
mark_as_advanced(Liblo_LIB)
mark_as_advanced(Libmapper_LIB)
if (APPLE)
set(CMAKE_OSX_ARCHITECTURES x86_64;arm64)
endif()
# Add subdirectories for each external
set(EXTERNALS_LIST "${CMAKE_CURRENT_SOURCE_DIR}/mapper;${CMAKE_CURRENT_SOURCE_DIR}/mpr.device;${CMAKE_CURRENT_SOURCE_DIR}/mpr.in;${CMAKE_CURRENT_SOURCE_DIR}/mpr.out;${CMAKE_CURRENT_SOURCE_DIR}/oscmulticast")
foreach (external_dir ${EXTERNALS_LIST})
#message("checking in: ${external_dir}")
if (EXISTS "${external_dir}/CMakeLists.txt")
add_subdirectory(${external_dir})
endif ()
endforeach ()