-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·53 lines (37 loc) · 1.35 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
cmake_minimum_required(VERSION 3.12)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.11)
set(CMAKE_OSX_SYSROOT /)
set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY true)
add_compile_options(-Wall)
# mostly for puredata sources:
#add_compile_options(-Wno-unused-parameter)
if(POLICY CMP0074)
#policy for <PackageName>_ROOT variables
cmake_policy(SET CMP0074 NEW)
endif()
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/compactlib/cmake)
project(pdinstance_tester)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/pd_headers")
add_library(pdinstance_tester SHARED src/instance_tester.cpp)
if (NOT WIN32)
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -undefined dynamic_lookup")
endif()
set_target_properties( pdinstance_tester
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/package"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/package"
)
add_custom_command(
TARGET pdinstance_tester
PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy
${CMAKE_SOURCE_DIR}/help/pdinstance_tester-help.pd
${CMAKE_SOURCE_DIR}/package/pdinstance_tester-help.pd
)
if (NOT WIN32)
set_target_properties(pdinstance_tester PROPERTIES SUFFIX ".pd_darwin")
endif()
set_target_properties(pdinstance_tester PROPERTIES PREFIX "")