-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathCMakeLists.txt
42 lines (30 loc) · 1.2 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
###############################
# pure data external
project(rngs_chorus)
set(RNGS_CHORUS_SRC
rngs_chorus~.cpp
)
include_directories(
"${PROJECT_SOURCE_DIR}/../mi"
"${PROJECT_SOURCE_DIR}/.."
)
add_library(rngs_chorus SHARED ${RNGS_CHORUS_SRC})
target_link_libraries(rngs_chorus MILib)
### setup for pure data
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "rngs_chorus~")
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
if (${APPLE})
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
set_target_properties(${PROJECT_NAME} PROPERTIES SUFFIX ".pd_darwin")
elseif (${UNIX})
set_target_properties(${PROJECT_NAME} PROPERTIES SUFFIX ".pd_linux")
elseif (${WIN32})
set_target_properties(${PROJECT_NAME} PROPERTIES SUFFIX ".dll")
find_library(PD_LIBRARY NAMES pd HINTS ${PD_CMAKE_PATH})
target_link_libraries(${PROJECT_NAME} ${PD_LIBRARY})
endif ()
# Removes some warning for Microsoft Visual C.
if (${MSVC})
target_compile_definitions(${PROJECT_NAME} PRIVATE PD_INTERNAL)
set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY COMPILE_FLAGS "/D_CRT_SECURE_NO_WARNINGS /wd4091 /wd4996")
endif ()