forked from donPedroDelasincamida/ScorePfa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
61 lines (50 loc) · 1.52 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
project(score_addon_dawimport LANGUAGES CXX)
# General initialization
score_common_setup()
# Source files
set(HDRS
DawImport/ApplicationPlugin.hpp
DawImport/ParseStructs.hpp
DawImport/Structs.hpp
DawImport/getXmlElements.hpp
DawImport/gzipSupport.hpp
DawImport/Debug.hpp
DawImport/CreateStructs.hpp
score_addon_dawimport.hpp
)
set(SRCS
DawImport/ApplicationPlugin.cpp
DawImport/ParseStructs.cpp
DawImport/getXmlElements.cpp
DawImport/Debug.cpp
DawImport/gzipSupport.cpp
DawImport/CreateStructs.cpp
score_addon_dawimport.cpp
)
# Creation of the library
add_library(${PROJECT_NAME} ${SRCS} ${HDRS})
# Code generation
score_generate_command_list_file(${PROJECT_NAME} "${HDRS}")
# Link
target_link_libraries(${PROJECT_NAME} PUBLIC score_plugin_engine score_plugin_midi score_plugin_media)
target_compile_definitions(${PROJECT_NAME} PRIVATE PLUGIN_SOURCE_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}\")
# Target-specific options
setup_score_plugin(${PROJECT_NAME})
project(score_addons LANGUAGES CXX)
macro(SUBDIRLIST result curdir)
file(GLOB children RELATIVE ${curdir} ${curdir}/*)
set(dirlist "")
foreach(child ${children})
if(IS_DIRECTORY ${curdir}/${child})
list(APPEND dirlist ${child})
endif()
endforeach()
set(${result} ${dirlist})
endmacro()
subdirlist(SUBDIRS "${CMAKE_CURRENT_SOURCE_DIR}")
set(SCORE_ADDON True)
foreach(subdir ${SUBDIRS})
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/CMakeLists.txt")
add_subdirectory("${subdir}")
endif()
endforeach()