-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
52 lines (43 loc) · 1.24 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
include(${CMAKE_CURRENT_SOURCE_DIR}/../../max-sdk-base/script/max-pretarget.cmake)
set(CMAKE_VERBOSE_MAKEFILE ON)
#############################################################
# MAX EXTERNAL
#############################################################
# the below is not working on Mac for me so finding and specifying
# header and library explicitly
#find_package(Csound)
if(APPLE)
find_path(CSOUND_HEADER_PATH csound.h)
find_library(CSOUND_LIBRARY CsoundLib64)
else()
find_path(CSOUND_HEADER_PATH csound/csound.h)
find_library(CSOUND_LIBRARY csound64.lib)
endif()
if(CSOUND_HEADER_PATH)
MESSAGE("found csound header path: ${CSOUND_HEADER_PATH}")
else()
MESSAGE(FATAL_ERROR "could not find csound header path")
endif()
if(CSOUND_LIBRARY)
MESSAGE("found csound library path: ${CSOUND_LIBRARY}")
else()
MESSAGE(FATAL_ERROR "could not find csound library path")
endif()
include_directories(
"${MAX_SDK_INCLUDES}"
"${MAX_SDK_MSP_INCLUDES}"
"${MAX_SDK_JIT_INCLUDES}"
"${CSOUND_HEADER_PATH}"
)
link_libraries(${CSOUND_LIBRARY})
file(GLOB PROJECT_SRC
"*.h"
"*.c"
"*.cpp"
)
add_library(
${PROJECT_NAME}
MODULE
${PROJECT_SRC}
)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../max-sdk-base/script/max-posttarget.cmake)