2023-10-22 13:24:32 +02:00
|
|
|
set(PLUGINSCOMMON_SOURCES
|
|
|
|
|
common/plugin/RMSFollower.h
|
|
|
|
|
common/plugin/MessageUtils.h
|
|
|
|
|
common/plugin/MessageUtils.cpp
|
|
|
|
|
common/plugin/InstrumentDescription.h
|
|
|
|
|
common/plugin/InstrumentDescription.cpp
|
|
|
|
|
common/plugin/NativeHelpers.h
|
|
|
|
|
common/plugin/NativeHelpers.cpp
|
|
|
|
|
common/plugin/SfizzFileScan.h
|
|
|
|
|
common/plugin/SfizzFileScan.cpp
|
|
|
|
|
common/plugin/FileTrie.h
|
|
|
|
|
common/plugin/FileTrie.cpp
|
|
|
|
|
common/plugin/SfizzForeignPaths.h
|
|
|
|
|
common/plugin/SfizzForeignPaths.cpp
|
|
|
|
|
common/plugin/SfizzSettings.h
|
|
|
|
|
common/plugin/SfizzSettings.cpp
|
|
|
|
|
)
|
2024-01-10 14:42:31 +01:00
|
|
|
if(SFIZZ_CMAKE_USE_EMPTY_SOURCE_GROUPS)
|
|
|
|
|
source_group("" FILES ${PLUGINSCOMMON_SOURCES})
|
|
|
|
|
endif()
|
|
|
|
|
add_library(plugins_common STATIC EXCLUDE_FROM_ALL ${PLUGINSCOMMON_SOURCES})
|
2023-10-22 13:24:32 +02:00
|
|
|
|
2023-05-08 14:43:33 +02:00
|
|
|
if(APPLE)
|
2024-01-10 14:42:31 +01:00
|
|
|
target_sources(plugins_common PRIVATE
|
|
|
|
|
"common/plugin/SfizzForeignPaths.mm"
|
|
|
|
|
"common/plugin/SfizzSettings.mm"
|
|
|
|
|
"common/plugin/NativeHelpers.mm"
|
|
|
|
|
)
|
|
|
|
|
set_property(SOURCE
|
2023-05-08 14:43:33 +02:00
|
|
|
"common/plugin/SfizzForeignPaths.mm"
|
|
|
|
|
"common/plugin/SfizzSettings.mm"
|
2024-01-10 14:42:31 +01:00
|
|
|
"common/plugin/NativeHelpers.mm"
|
2023-05-08 14:43:33 +02:00
|
|
|
APPEND_STRING
|
2024-01-10 14:42:31 +01:00
|
|
|
PROPERTY COMPILE_FLAGS " -fobjc-arc"
|
|
|
|
|
)
|
2023-05-08 14:43:33 +02:00
|
|
|
endif()
|
2024-01-10 14:42:31 +01:00
|
|
|
target_include_directories(plugins_common PUBLIC "common")
|
|
|
|
|
target_link_libraries(plugins_common
|
|
|
|
|
PUBLIC
|
|
|
|
|
sfizz::spin_mutex
|
|
|
|
|
sfizz::simde
|
|
|
|
|
sfizz::filesystem
|
|
|
|
|
absl::strings
|
|
|
|
|
PRIVATE
|
|
|
|
|
sfizz::pugixml
|
|
|
|
|
sfizz::internal
|
|
|
|
|
sfizz::sfizz
|
|
|
|
|
)
|
|
|
|
|
add_library(plugins::common ALIAS plugins_common)
|
2023-05-08 14:43:33 +02:00
|
|
|
|
2024-01-04 09:57:29 +01:00
|
|
|
add_custom_target(generate_plugins_git_build_id
|
|
|
|
|
COMMAND
|
|
|
|
|
"${CMAKE_COMMAND}"
|
|
|
|
|
"-DSOURCE_DIR=${PROJECT_SOURCE_DIR}"
|
|
|
|
|
"-DOUTPUT_FILE=${PROJECT_BINARY_DIR}/git-build-id/PluginGitBuildId.c"
|
|
|
|
|
"-DPREFIX=Plugin"
|
|
|
|
|
"-P" "${PROJECT_SOURCE_DIR}/library/cmake/GitBuildID.cmake"
|
|
|
|
|
BYPRODUCTS
|
|
|
|
|
"${PROJECT_BINARY_DIR}/git-build-id/PluginGitBuildId.c"
|
|
|
|
|
)
|
2024-01-10 14:42:31 +01:00
|
|
|
set(PLUGINS_GIT_BUILD_ID_SOURCES
|
2024-01-04 09:57:29 +01:00
|
|
|
"${PROJECT_SOURCE_DIR}/plugins/git-build-id/PluginGitBuildId.h"
|
|
|
|
|
"${PROJECT_BINARY_DIR}/git-build-id/PluginGitBuildId.c"
|
|
|
|
|
)
|
2024-01-10 14:42:31 +01:00
|
|
|
if(SFIZZ_CMAKE_USE_EMPTY_SOURCE_GROUPS)
|
|
|
|
|
source_group("" FILES ${PLUGINS_GIT_BUILD_ID_SOURCES})
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
add_library(plugins_git_build_id STATIC EXCLUDE_FROM_ALL ${PLUGINS_GIT_BUILD_ID_SOURCES})
|
2024-01-04 09:57:29 +01:00
|
|
|
target_include_directories(plugins_git_build_id PUBLIC "${PROJECT_SOURCE_DIR}/plugins/git-build-id")
|
|
|
|
|
add_dependencies(plugins_git_build_id generate_plugins_git_build_id)
|
|
|
|
|
add_library(plugins::git_build_id ALIAS plugins_git_build_id)
|
|
|
|
|
|
2023-05-08 14:43:33 +02:00
|
|
|
# Link system dependencies
|
|
|
|
|
if(WIN32)
|
|
|
|
|
elseif(ANDROID)
|
|
|
|
|
elseif(APPLE)
|
2024-01-10 14:42:31 +01:00
|
|
|
target_link_libraries(plugins_common PRIVATE
|
2023-05-08 14:43:33 +02:00
|
|
|
"${APPLE_FOUNDATION_LIBRARY}")
|
|
|
|
|
else()
|
|
|
|
|
endif()
|
|
|
|
|
|
2023-05-20 16:21:00 +02:00
|
|
|
if((PLUGIN_LV2 AND PLUGIN_LV2_UI) OR PLUGIN_VST3 OR PLUGIN_AU OR PLUGIN_VST2)
|
2023-05-08 14:43:33 +02:00
|
|
|
add_subdirectory(editor)
|
|
|
|
|
endif()
|
|
|
|
|
|
2023-05-20 16:21:00 +02:00
|
|
|
if(PLUGIN_LV2)
|
2023-05-08 14:43:33 +02:00
|
|
|
add_subdirectory(lv2)
|
|
|
|
|
endif()
|
|
|
|
|
|
2023-05-20 16:21:00 +02:00
|
|
|
if((PLUGIN_VST3 OR PLUGIN_AU OR PLUGIN_VST2) AND NOT (PROJECT_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc).*"))
|
2023-05-08 14:43:33 +02:00
|
|
|
add_subdirectory(vst)
|
|
|
|
|
endif()
|
|
|
|
|
|
2023-05-20 16:21:00 +02:00
|
|
|
if(PLUGIN_PUREDATA)
|
2023-05-08 14:43:33 +02:00
|
|
|
add_subdirectory(puredata)
|
|
|
|
|
endif()
|