migrating to the latest JUCE version
This commit is contained in:
@ -1,15 +1,15 @@
|
||||
# ==============================================================================
|
||||
#
|
||||
# This file is part of the JUCE library.
|
||||
# Copyright (c) 2020 - Raw Material Software Limited
|
||||
# Copyright (c) 2022 - Raw Material Software Limited
|
||||
#
|
||||
# JUCE is an open source library subject to commercial or open-source
|
||||
# licensing.
|
||||
#
|
||||
# By using JUCE, you agree to the terms of both the JUCE 6 End-User License
|
||||
# Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
|
||||
# By using JUCE, you agree to the terms of both the JUCE 7 End-User License
|
||||
# Agreement and JUCE Privacy Policy.
|
||||
#
|
||||
# End User License Agreement: www.juce.com/juce-6-licence
|
||||
# End User License Agreement: www.juce.com/juce-7-licence
|
||||
# Privacy Policy: www.juce.com/juce-privacy-policy
|
||||
#
|
||||
# Or: You may also use this code under the terms of the GPL v3 (see
|
||||
@ -29,7 +29,19 @@ function(_juce_create_atomic_target target_name)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(test_file_contents
|
||||
set(test_atomic_with_is_lock_free_file_contents
|
||||
[[
|
||||
#include <atomic>
|
||||
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
std::atomic<long long> ll { static_cast<long long> (argc) };
|
||||
ll ^= static_cast<long long> (ll.is_lock_free());
|
||||
return static_cast<int> (ll);
|
||||
}
|
||||
]])
|
||||
|
||||
set(test_simple_atomic_file_contents
|
||||
[[
|
||||
#include <atomic>
|
||||
|
||||
@ -47,7 +59,7 @@ function(_juce_create_atomic_target target_name)
|
||||
string(RANDOM LENGTH 16 random_dir_string)
|
||||
set(test_bindir "${CMAKE_CURRENT_BINARY_DIR}/check_atomic_dir_${random_dir_string}")
|
||||
|
||||
file(WRITE "${test_file_name}" "${test_file_contents}")
|
||||
file(WRITE "${test_file_name}" "${test_atomic_with_is_lock_free_file_contents}")
|
||||
|
||||
try_compile(compile_result "${test_bindir}" "${test_file_name}"
|
||||
OUTPUT_VARIABLE test_build_output_0
|
||||
@ -64,15 +76,37 @@ function(_juce_create_atomic_target target_name)
|
||||
CXX_EXTENSIONS FALSE)
|
||||
|
||||
if (NOT compile_result)
|
||||
message(FATAL_ERROR
|
||||
"First build output:\n"
|
||||
"${test_build_output_0}"
|
||||
"\n\nSecond build output:\n"
|
||||
"${test_build_output_1}"
|
||||
"\n\nJUCE requires support for std::atomic, but this system cannot "
|
||||
"successfully compile a program which uses std::atomic. "
|
||||
"You may need to install a dedicated libatomic package using your "
|
||||
"system's package manager.")
|
||||
file(WRITE "${test_file_name}" "${test_simple_atomic_file_contents}")
|
||||
|
||||
try_compile(compile_result "${test_bindir}" "${test_file_name}"
|
||||
OUTPUT_VARIABLE test_build_output_2
|
||||
LINK_LIBRARIES atomic
|
||||
CXX_STANDARD 14
|
||||
CXX_STANDARD_REQUIRED TRUE
|
||||
CXX_EXTENSIONS FALSE)
|
||||
|
||||
if (NOT compile_result)
|
||||
message(FATAL_ERROR
|
||||
"First build output:\n"
|
||||
"${test_build_output_0}"
|
||||
"\n\nSecond build output:\n"
|
||||
"${test_build_output_1}"
|
||||
"\n\nThird build output:\n"
|
||||
"${test_build_output_2}"
|
||||
"\n\nJUCE requires support for std::atomic, but this system cannot "
|
||||
"successfully compile a program which uses std::atomic. "
|
||||
"You may need to install a dedicated libatomic package using your "
|
||||
"system's package manager.")
|
||||
else()
|
||||
message(WARNING
|
||||
"First build output:\n"
|
||||
"${test_build_output_0}"
|
||||
"\n\nSecond build output:\n"
|
||||
"${test_build_output_1}"
|
||||
"\n\nIf you are seeing this warning it means that the libatomic library"
|
||||
"on this system doesn't support is_lock_free."
|
||||
"Please let the JUCE team know.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries("${target_name}" INTERFACE atomic)
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/LV2_HELPER.cmake")
|
||||
|
||||
if(NOT TARGET juce::juceaide)
|
||||
add_executable(juce::juceaide IMPORTED)
|
||||
set_target_properties(juce::juceaide PROPERTIES
|
||||
|
@ -1,3 +1,26 @@
|
||||
# ==============================================================================
|
||||
#
|
||||
# This file is part of the JUCE library.
|
||||
# Copyright (c) 2022 - Raw Material Software Limited
|
||||
#
|
||||
# JUCE is an open source library subject to commercial or open-source
|
||||
# licensing.
|
||||
#
|
||||
# By using JUCE, you agree to the terms of both the JUCE 7 End-User License
|
||||
# Agreement and JUCE Privacy Policy.
|
||||
#
|
||||
# End User License Agreement: www.juce.com/juce-7-licence
|
||||
# Privacy Policy: www.juce.com/juce-privacy-policy
|
||||
#
|
||||
# Or: You may also use this code under the terms of the GPL v3 (see
|
||||
# www.gnu.org/licenses).
|
||||
#
|
||||
# JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
|
||||
# EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
|
||||
# DISCLAIMED.
|
||||
#
|
||||
# ==============================================================================
|
||||
|
||||
add_library(juce_recommended_warning_flags INTERFACE)
|
||||
add_library(juce::juce_recommended_warning_flags ALIAS juce_recommended_warning_flags)
|
||||
|
||||
@ -9,19 +32,21 @@ elseif((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQU
|
||||
-Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare
|
||||
-Wint-conversion -Wconditional-uninitialized -Wconstant-conversion
|
||||
-Wsign-conversion -Wbool-conversion -Wextra-semi -Wunreachable-code
|
||||
-Wcast-align -Wshift-sign-overflow -Wno-missing-field-initializers
|
||||
-Wcast-align -Wshift-sign-overflow -Wmissing-prototypes
|
||||
-Wnullable-to-nonnull-conversion -Wno-ignored-qualifiers -Wswitch-enum
|
||||
-Wpedantic
|
||||
-Wpedantic -Wdeprecated
|
||||
$<$<OR:$<COMPILE_LANGUAGE:CXX>,$<COMPILE_LANGUAGE:OBJCXX>>:
|
||||
-Wzero-as-null-pointer-constant -Wunused-private-field
|
||||
-Woverloaded-virtual -Wreorder
|
||||
-Winconsistent-missing-destructor-override>)
|
||||
-Winconsistent-missing-destructor-override>
|
||||
$<$<OR:$<COMPILE_LANGUAGE:OBJC>,$<COMPILE_LANGUAGE:OBJCXX>>:
|
||||
-Wunguarded-availability -Wunguarded-availability-new>)
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(juce_recommended_warning_flags INTERFACE
|
||||
-Wall -Wextra -Wpedantic -Wstrict-aliasing -Wuninitialized
|
||||
-Wunused-parameter -Wsign-compare -Wsign-conversion -Wunreachable-code
|
||||
-Wcast-align -Wno-implicit-fallthrough -Wno-maybe-uninitialized
|
||||
-Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum
|
||||
-Wno-ignored-qualifiers -Wswitch-enum
|
||||
-Wredundant-decls -Wno-strict-overflow -Wshadow
|
||||
$<$<COMPILE_LANGUAGE:CXX>:
|
||||
-Woverloaded-virtual -Wreorder -Wzero-as-null-pointer-constant>)
|
||||
@ -53,9 +78,9 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX_COMPILER_FRONTEND_VARIA
|
||||
$<$<CONFIG:Release>:$<IF:$<STREQUAL:"${CMAKE_CXX_COMPILER_ID}","MSVC">,-GL,-flto>>)
|
||||
target_link_libraries(juce_recommended_lto_flags INTERFACE
|
||||
$<$<CONFIG:Release>:$<$<STREQUAL:"${CMAKE_CXX_COMPILER_ID}","MSVC">:-LTCG>>)
|
||||
elseif((CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))
|
||||
elseif((NOT MINGW) AND ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")))
|
||||
target_compile_options(juce_recommended_lto_flags INTERFACE $<$<CONFIG:Release>:-flto>)
|
||||
target_link_libraries(juce_recommended_lto_flags INTERFACE $<$<CONFIG:Release>:-flto>)
|
||||
endif()
|
||||
|
138
deps/juce/extras/Build/CMake/JUCEModuleSupport.cmake
vendored
138
deps/juce/extras/Build/CMake/JUCEModuleSupport.cmake
vendored
@ -1,15 +1,15 @@
|
||||
# ==============================================================================
|
||||
#
|
||||
# This file is part of the JUCE library.
|
||||
# Copyright (c) 2020 - Raw Material Software Limited
|
||||
# Copyright (c) 2022 - Raw Material Software Limited
|
||||
#
|
||||
# JUCE is an open source library subject to commercial or open-source
|
||||
# licensing.
|
||||
#
|
||||
# By using JUCE, you agree to the terms of both the JUCE 6 End-User License
|
||||
# Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
|
||||
# By using JUCE, you agree to the terms of both the JUCE 7 End-User License
|
||||
# Agreement and JUCE Privacy Policy.
|
||||
#
|
||||
# End User License Agreement: www.juce.com/juce-6-licence
|
||||
# End User License Agreement: www.juce.com/juce-7-licence
|
||||
# Privacy Policy: www.juce.com/juce-privacy-policy
|
||||
#
|
||||
# Or: You may also use this code under the terms of the GPL v3 (see
|
||||
@ -83,8 +83,10 @@ endfunction()
|
||||
|
||||
macro(_juce_make_absolute path)
|
||||
if(NOT IS_ABSOLUTE "${${path}}")
|
||||
get_filename_component("${path}" "${${path}}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_LIST_DIR}")
|
||||
get_filename_component(${path} "${${path}}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_LIST_DIR}")
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE "\\\\" "/" ${path} "${${path}}")
|
||||
endmacro()
|
||||
|
||||
macro(_juce_make_absolute_and_check path)
|
||||
@ -120,23 +122,23 @@ function(_juce_extract_metadata_block delim_str file_with_block out_dict)
|
||||
|
||||
foreach(line IN LISTS module_header_contents)
|
||||
if(NOT append)
|
||||
if(line MATCHES " *BEGIN_${delim_str} *")
|
||||
if(line MATCHES "[\t ]*BEGIN_${delim_str}[\t ]*")
|
||||
set(append YES)
|
||||
endif()
|
||||
|
||||
continue()
|
||||
endif()
|
||||
|
||||
if(append AND (line MATCHES " *END_${delim_str} *"))
|
||||
if(append AND (line MATCHES "[\t ]*END_${delim_str}[\t ]*"))
|
||||
break()
|
||||
endif()
|
||||
|
||||
if(line MATCHES "^ *([a-zA-Z]+):")
|
||||
if(line MATCHES "^[\t ]*([a-zA-Z]+):")
|
||||
set(last_written_key "${CMAKE_MATCH_1}")
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE "^ *${last_written_key}: *" "" line "${line}")
|
||||
string(REGEX REPLACE "[ ,]+" ";" line "${line}")
|
||||
string(REGEX REPLACE "^[\t ]*${last_written_key}:[\t ]*" "" line "${line}")
|
||||
string(REGEX REPLACE "[\t ,]+" ";" line "${line}")
|
||||
|
||||
set_property(TARGET ${target_name} APPEND PROPERTY
|
||||
"INTERFACE_JUCE_${last_written_key}" "${line}")
|
||||
@ -234,7 +236,7 @@ endfunction()
|
||||
# ==================================================================================================
|
||||
|
||||
function(_juce_get_all_plugin_kinds out)
|
||||
set(${out} AU AUv3 AAX Standalone Unity VST VST3 PARENT_SCOPE)
|
||||
set(${out} AU AUv3 AAX LV2 Standalone Unity VST VST3 PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(_juce_get_platform_plugin_kinds out)
|
||||
@ -249,7 +251,11 @@ function(_juce_get_platform_plugin_kinds out)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_SYSTEM_NAME STREQUAL "iOS" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
list(APPEND result AAX Unity VST VST3)
|
||||
list(APPEND result Unity VST VST3 LV2)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
list(APPEND result AAX)
|
||||
endif()
|
||||
|
||||
set(${out} ${result} PARENT_SCOPE)
|
||||
@ -272,22 +278,29 @@ endfunction()
|
||||
|
||||
# ==================================================================================================
|
||||
|
||||
# Takes a target, a link visibility, and a variable-length list of framework
|
||||
# names. On macOS, finds the requested frameworks using `find_library` and
|
||||
# links them. On iOS, links directly with `-framework Name`.
|
||||
# Takes a target, a link visibility, if it should be a weak link, and a variable-length list of
|
||||
# framework names. On macOS, for non-weak links, this finds the requested frameworks using
|
||||
# `find_library`.
|
||||
function(_juce_link_frameworks target visibility)
|
||||
foreach(framework IN LISTS ARGN)
|
||||
set(options WEAK)
|
||||
cmake_parse_arguments(JUCE_LINK_FRAMEWORKS "${options}" "" "" ${ARGN})
|
||||
foreach(framework IN LISTS JUCE_LINK_FRAMEWORKS_UNPARSED_ARGUMENTS)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
find_library("juce_found_${framework}" "${framework}" REQUIRED)
|
||||
target_link_libraries("${target}" "${visibility}" "${juce_found_${framework}}")
|
||||
if(JUCE_LINK_FRAMEWORKS_WEAK)
|
||||
set(framework_flags "-weak_framework ${framework}")
|
||||
else()
|
||||
find_library("juce_found_${framework}" "${framework}" REQUIRED)
|
||||
set(framework_flags "${juce_found_${framework}}")
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
# CoreServices is only available on iOS 12+, we must link it weakly on earlier platforms
|
||||
if((framework STREQUAL "CoreServices") AND (CMAKE_OSX_DEPLOYMENT_TARGET LESS 12.0))
|
||||
if(JUCE_LINK_FRAMEWORKS_WEAK OR ((framework STREQUAL "CoreServices") AND (CMAKE_OSX_DEPLOYMENT_TARGET LESS 12.0)))
|
||||
set(framework_flags "-weak_framework ${framework}")
|
||||
else()
|
||||
set(framework_flags "-framework ${framework}")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
if(NOT framework_flags STREQUAL "")
|
||||
target_link_libraries("${target}" "${visibility}" "${framework_flags}")
|
||||
endif()
|
||||
endforeach()
|
||||
@ -398,6 +411,11 @@ endfunction()
|
||||
|
||||
# ==================================================================================================
|
||||
|
||||
function(_juce_remove_empty_list_elements arg)
|
||||
list(FILTER ${arg} EXCLUDE REGEX "^$")
|
||||
set(${arg} ${${arg}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(juce_add_module module_path)
|
||||
set(one_value_args INSTALL_PATH ALIAS_NAMESPACE)
|
||||
cmake_parse_arguments(JUCE_ARG "" "${one_value_args}" "" ${ARGN})
|
||||
@ -484,8 +502,30 @@ function(juce_add_module module_path)
|
||||
|
||||
target_link_libraries(juce_audio_processors INTERFACE juce_vst3_headers)
|
||||
|
||||
add_library(juce_lilv_headers INTERFACE)
|
||||
set(lv2_base_path "${base_path}/juce_audio_processors/format_types/LV2_SDK")
|
||||
target_include_directories(juce_lilv_headers INTERFACE
|
||||
"${lv2_base_path}"
|
||||
"${lv2_base_path}/lv2"
|
||||
"${lv2_base_path}/serd"
|
||||
"${lv2_base_path}/sord"
|
||||
"${lv2_base_path}/sord/src"
|
||||
"${lv2_base_path}/sratom"
|
||||
"${lv2_base_path}/lilv"
|
||||
"${lv2_base_path}/lilv/src")
|
||||
target_link_libraries(juce_audio_processors INTERFACE juce_lilv_headers)
|
||||
|
||||
add_library(juce_ara_headers INTERFACE)
|
||||
|
||||
target_include_directories(juce_ara_headers INTERFACE
|
||||
"$<$<TARGET_EXISTS:juce_ara_sdk>:$<TARGET_PROPERTY:juce_ara_sdk,INTERFACE_INCLUDE_DIRECTORIES>>")
|
||||
|
||||
target_link_libraries(juce_audio_processors INTERFACE juce_ara_headers)
|
||||
|
||||
if(JUCE_ARG_ALIAS_NAMESPACE)
|
||||
add_library(${JUCE_ARG_ALIAS_NAMESPACE}::juce_vst3_headers ALIAS juce_vst3_headers)
|
||||
add_library(${JUCE_ARG_ALIAS_NAMESPACE}::juce_lilv_headers ALIAS juce_lilv_headers)
|
||||
add_library(${JUCE_ARG_ALIAS_NAMESPACE}::juce_ara_headers ALIAS juce_ara_headers)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -497,6 +537,25 @@ function(juce_add_module module_path)
|
||||
target_compile_definitions(${module_name} INTERFACE LINUX=1)
|
||||
endif()
|
||||
|
||||
if((${module_name} STREQUAL "juce_audio_devices") AND (CMAKE_SYSTEM_NAME STREQUAL "Android"))
|
||||
add_subdirectory("${module_path}/native/oboe")
|
||||
target_link_libraries(${module_name} INTERFACE oboe)
|
||||
endif()
|
||||
|
||||
if((${module_name} STREQUAL "juce_opengl") AND (CMAKE_SYSTEM_NAME STREQUAL "Android"))
|
||||
set(platform_supports_gl3 0)
|
||||
|
||||
if(CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL 18)
|
||||
set(platform_supports_gl3 1)
|
||||
endif()
|
||||
|
||||
if(platform_supports_gl3)
|
||||
target_compile_definitions(${module_name} INTERFACE JUCE_ANDROID_GL_ES_VERSION_3_0=1)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${module_name} INTERFACE EGL $<IF:${platform_supports_gl3},GLESv3,GLESv2>)
|
||||
endif()
|
||||
|
||||
_juce_extract_metadata_block(JUCE_MODULE_DECLARATION "${module_path}/${module_header_name}" metadata_dict)
|
||||
|
||||
_juce_get_metadata("${metadata_dict}" minimumCppStandard module_cpp_standard)
|
||||
@ -510,26 +569,34 @@ function(juce_add_module module_path)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
_juce_get_metadata("${metadata_dict}" OSXFrameworks module_osxframeworks)
|
||||
|
||||
_juce_remove_empty_list_elements(module_osxframeworks)
|
||||
foreach(module_framework IN LISTS module_osxframeworks)
|
||||
if(module_framework STREQUAL "")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
_juce_link_frameworks("${module_name}" INTERFACE "${module_framework}")
|
||||
endforeach()
|
||||
|
||||
_juce_get_metadata("${metadata_dict}" WeakOSXFrameworks module_weakosxframeworks)
|
||||
|
||||
_juce_remove_empty_list_elements(module_weakosxframeworks)
|
||||
foreach(module_framework IN LISTS module_weakosxframeworks)
|
||||
_juce_link_frameworks("${module_name}" INTERFACE WEAK "${module_framework}")
|
||||
endforeach()
|
||||
|
||||
_juce_link_libs_from_metadata("${module_name}" "${metadata_dict}" OSXLibs)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
_juce_get_metadata("${metadata_dict}" iOSFrameworks module_iosframeworks)
|
||||
|
||||
_juce_remove_empty_list_elements(module_iosframeworks)
|
||||
foreach(module_framework IN LISTS module_iosframeworks)
|
||||
if(module_framework STREQUAL "")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
_juce_link_frameworks("${module_name}" INTERFACE "${module_framework}")
|
||||
endforeach()
|
||||
|
||||
_juce_get_metadata("${metadata_dict}" WeakiOSFrameworks module_weakiosframeworks)
|
||||
|
||||
_juce_remove_empty_list_elements(module_weakiosframeworks)
|
||||
foreach(module_framework IN LISTS module_weakiosframeworks)
|
||||
_juce_link_frameworks("${module_name}" INTERFACE WEAK "${module_framework}")
|
||||
endforeach()
|
||||
|
||||
_juce_link_libs_from_metadata("${module_name}" "${metadata_dict}" iOSLibs)
|
||||
elseif((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD"))
|
||||
_juce_get_metadata("${metadata_dict}" linuxPackages module_linuxpackages)
|
||||
@ -590,3 +657,18 @@ function(juce_add_modules)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# When source groups are enabled, this function sets the HEADER_FILE_ONLY property on any module
|
||||
# source files that should not be built. This is called automatically by the juce_add_* functions.
|
||||
function(_juce_fixup_module_source_groups)
|
||||
if(JUCE_ENABLE_MODULE_SOURCE_GROUPS)
|
||||
get_property(all_modules GLOBAL PROPERTY _juce_module_names)
|
||||
|
||||
foreach(module_name IN LISTS all_modules)
|
||||
get_target_property(path ${module_name} INTERFACE_JUCE_MODULE_PATH)
|
||||
get_target_property(header_files ${module_name} INTERFACE_JUCE_MODULE_HEADERS)
|
||||
get_target_property(source_files ${module_name} INTERFACE_JUCE_MODULE_SOURCES)
|
||||
source_group(TREE ${path} PREFIX "JUCE Modules" FILES ${header_files} ${source_files})
|
||||
set_source_files_properties(${header_files} PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
282
deps/juce/extras/Build/CMake/JUCEUtils.cmake
vendored
282
deps/juce/extras/Build/CMake/JUCEUtils.cmake
vendored
@ -1,15 +1,15 @@
|
||||
# ==============================================================================
|
||||
#
|
||||
# This file is part of the JUCE library.
|
||||
# Copyright (c) 2020 - Raw Material Software Limited
|
||||
# Copyright (c) 2022 - Raw Material Software Limited
|
||||
#
|
||||
# JUCE is an open source library subject to commercial or open-source
|
||||
# licensing.
|
||||
#
|
||||
# By using JUCE, you agree to the terms of both the JUCE 6 End-User License
|
||||
# Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
|
||||
# By using JUCE, you agree to the terms of both the JUCE 7 End-User License
|
||||
# Agreement and JUCE Privacy Policy.
|
||||
#
|
||||
# End User License Agreement: www.juce.com/juce-6-licence
|
||||
# End User License Agreement: www.juce.com/juce-7-licence
|
||||
# Privacy Policy: www.juce.com/juce-privacy-policy
|
||||
#
|
||||
# Or: You may also use this code under the terms of the GPL v3 (see
|
||||
@ -75,6 +75,10 @@ define_property(TARGET PROPERTY JUCE_UNITY_COPY_DIR INHERITED
|
||||
BRIEF_DOCS "Install location for Unity plugins"
|
||||
FULL_DOCS "This is where the plugin will be copied if plugin copying is enabled")
|
||||
|
||||
define_property(TARGET PROPERTY JUCE_LV2_COPY_DIR INHERITED
|
||||
BRIEF_DOCS "Install location for LV2 plugins"
|
||||
FULL_DOCS "This is where the plugin will be copied if plugin copying is enabled")
|
||||
|
||||
define_property(TARGET PROPERTY JUCE_COPY_PLUGIN_AFTER_BUILD INHERITED
|
||||
BRIEF_DOCS "Whether or not plugins should be copied after building"
|
||||
FULL_DOCS "Whether or not plugins should be copied after building")
|
||||
@ -97,10 +101,12 @@ endif()
|
||||
|
||||
function(_juce_set_default_properties)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set_property(GLOBAL PROPERTY JUCE_VST_COPY_DIR "$ENV{HOME}/Library/Audio/Plug-Ins/VST")
|
||||
set_property(GLOBAL PROPERTY JUCE_VST3_COPY_DIR "$ENV{HOME}/Library/Audio/Plug-Ins/VST3")
|
||||
set_property(GLOBAL PROPERTY JUCE_AU_COPY_DIR "$ENV{HOME}/Library/Audio/Plug-Ins/Components")
|
||||
set_property(GLOBAL PROPERTY JUCE_AAX_COPY_DIR "/Library/Application Support/Avid/Audio/Plug-Ins")
|
||||
set_property(GLOBAL PROPERTY JUCE_LV2_COPY_DIR "$ENV{HOME}/Library/Audio/Plug-Ins/LV2")
|
||||
set_property(GLOBAL PROPERTY JUCE_VST_COPY_DIR "$ENV{HOME}/Library/Audio/Plug-Ins/VST")
|
||||
set_property(GLOBAL PROPERTY JUCE_VST3_COPY_DIR "$ENV{HOME}/Library/Audio/Plug-Ins/VST3")
|
||||
set_property(GLOBAL PROPERTY JUCE_AU_COPY_DIR "$ENV{HOME}/Library/Audio/Plug-Ins/Components")
|
||||
set_property(GLOBAL PROPERTY JUCE_UNITY_COPY_DIR "$ENV{HOME}/Library/Audio/Plug-Ins/Unity")
|
||||
set_property(GLOBAL PROPERTY JUCE_AAX_COPY_DIR "/Library/Application Support/Avid/Audio/Plug-Ins")
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set_property(GLOBAL PROPERTY JUCE_VST_COPY_DIR "$ENV{ProgramW6432}/Steinberg/Vstplugins")
|
||||
@ -110,11 +116,15 @@ function(_juce_set_default_properties)
|
||||
set(prefix "$ENV{CommonProgramFiles\(x86\)}")
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL PROPERTY JUCE_VST3_COPY_DIR "${prefix}/VST3")
|
||||
set_property(GLOBAL PROPERTY JUCE_AAX_COPY_DIR "${prefix}/Avid/Audio/Plug-Ins")
|
||||
set_property(GLOBAL PROPERTY JUCE_VST3_COPY_DIR "${prefix}/VST3")
|
||||
set_property(GLOBAL PROPERTY JUCE_AAX_COPY_DIR "${prefix}/Avid/Audio/Plug-Ins")
|
||||
set_property(GLOBAL PROPERTY JUCE_LV2_COPY_DIR "$ENV{APPDATA}/LV2")
|
||||
set_property(GLOBAL PROPERTY JUCE_UNITY_COPY_DIR "$ENV{APPDATA}/Unity")
|
||||
elseif((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD"))
|
||||
set_property(GLOBAL PROPERTY JUCE_VST_COPY_DIR "$ENV{HOME}/.vst")
|
||||
set_property(GLOBAL PROPERTY JUCE_VST3_COPY_DIR "$ENV{HOME}/.vst3")
|
||||
set_property(GLOBAL PROPERTY JUCE_LV2_COPY_DIR "$ENV{HOME}/.lv2")
|
||||
set_property(GLOBAL PROPERTY JUCE_VST_COPY_DIR "$ENV{HOME}/.vst")
|
||||
set_property(GLOBAL PROPERTY JUCE_VST3_COPY_DIR "$ENV{HOME}/.vst3")
|
||||
set_property(GLOBAL PROPERTY JUCE_UNITY_COPY_DIR "$ENV{HOME}/.unity")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@ -312,12 +322,17 @@ function(_juce_write_configure_time_info target)
|
||||
_juce_append_target_property(file_content PLUGIN_AU_MAIN_TYPE ${target} JUCE_AU_MAIN_TYPE_CODE)
|
||||
_juce_append_target_property(file_content IS_AU_SANDBOX_SAFE ${target} JUCE_AU_SANDBOX_SAFE)
|
||||
_juce_append_target_property(file_content IS_PLUGIN_SYNTH ${target} JUCE_IS_SYNTH)
|
||||
_juce_append_target_property(file_content IS_PLUGIN_ARA_EFFECT ${target} JUCE_IS_ARA_EFFECT)
|
||||
_juce_append_target_property(file_content SUPPRESS_AU_PLIST_RESOURCE_USAGE ${target} JUCE_SUPPRESS_AU_PLIST_RESOURCE_USAGE)
|
||||
_juce_append_target_property(file_content HARDENED_RUNTIME_ENABLED ${target} JUCE_HARDENED_RUNTIME_ENABLED)
|
||||
_juce_append_target_property(file_content APP_SANDBOX_ENABLED ${target} JUCE_APP_SANDBOX_ENABLED)
|
||||
_juce_append_target_property(file_content APP_SANDBOX_INHERIT ${target} JUCE_APP_SANDBOX_INHERIT)
|
||||
_juce_append_target_property(file_content HARDENED_RUNTIME_OPTIONS ${target} JUCE_HARDENED_RUNTIME_OPTIONS)
|
||||
_juce_append_target_property(file_content APP_SANDBOX_OPTIONS ${target} JUCE_APP_SANDBOX_OPTIONS)
|
||||
_juce_append_target_property(file_content APP_SANDBOX_FILE_ACCESS_HOME_RO ${target} JUCE_APP_SANDBOX_FILE_ACCESS_HOME_RO)
|
||||
_juce_append_target_property(file_content APP_SANDBOX_FILE_ACCESS_HOME_RW ${target} JUCE_APP_SANDBOX_FILE_ACCESS_HOME_RW)
|
||||
_juce_append_target_property(file_content APP_SANDBOX_FILE_ACCESS_ABS_RO ${target} JUCE_APP_SANDBOX_FILE_ACCESS_ABS_RO)
|
||||
_juce_append_target_property(file_content APP_SANDBOX_FILE_ACCESS_ABS_RW ${target} JUCE_APP_SANDBOX_FILE_ACCESS_ABS_RW)
|
||||
_juce_append_target_property(file_content APP_GROUPS_ENABLED ${target} JUCE_APP_GROUPS_ENABLED)
|
||||
_juce_append_target_property(file_content APP_GROUP_IDS ${target} JUCE_APP_GROUP_IDS)
|
||||
_juce_append_target_property(file_content IS_PLUGIN ${target} JUCE_IS_PLUGIN)
|
||||
@ -451,7 +466,7 @@ function(_juce_to_char_literal str out_var help_text)
|
||||
string(LENGTH "${str}" string_length)
|
||||
|
||||
if(NOT "${string_length}" EQUAL "4")
|
||||
message(FATAL_ERROR "The ${help_text} code must contain exactly four characters, but it was set to '${str}'")
|
||||
message(WARNING "The ${help_text} code must contain exactly four characters, but it was set to '${str}'")
|
||||
endif()
|
||||
|
||||
# Round-tripping through a file is the simplest way to convert a string to hex...
|
||||
@ -463,7 +478,8 @@ function(_juce_to_char_literal str out_var help_text)
|
||||
file(READ "${scratch_file}" four_chars_hex HEX)
|
||||
file(REMOVE "${scratch_file}")
|
||||
|
||||
set(${out_var} ${four_chars_hex} PARENT_SCOPE)
|
||||
string(SUBSTRING "${four_chars_hex}00000000" 0 8 four_chars_hex)
|
||||
set(${out_var} "${four_chars_hex}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# ==================================================================================================
|
||||
@ -501,10 +517,13 @@ function(_juce_execute_juceaide)
|
||||
message(FATAL_ERROR "juceaide was imported, but it doesn't exist!")
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND "${juceaide_location}" ${ARGN} RESULT_VARIABLE result_variable)
|
||||
execute_process(COMMAND "${juceaide_location}" ${ARGN}
|
||||
RESULT_VARIABLE result_variable
|
||||
OUTPUT_VARIABLE output
|
||||
ERROR_VARIABLE output)
|
||||
|
||||
if(result_variable)
|
||||
message(FATAL_ERROR "Running juceaide failed")
|
||||
message(FATAL_ERROR "Running juceaide failed:\n${output}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@ -855,7 +874,15 @@ function(juce_enable_copy_plugin_step shared_code_target)
|
||||
get_target_property(source "${target}" JUCE_PLUGIN_ARTEFACT_FILE)
|
||||
|
||||
if(source)
|
||||
get_target_property(dest "${target}" JUCE_PLUGIN_COPY_DIR)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
add_custom_command(TARGET ${target} POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
"-Dsrc=${source}"
|
||||
"-P" "${JUCE_CMAKE_UTILS_DIR}/checkBundleSigning.cmake"
|
||||
VERBATIM)
|
||||
endif()
|
||||
|
||||
get_target_property(dest "${target}" JUCE_PLUGIN_COPY_DIR)
|
||||
|
||||
if(dest)
|
||||
_juce_copy_dir("${target}" "${source}" "$<GENEX_EVAL:${dest}>")
|
||||
@ -979,6 +1006,29 @@ function(_juce_set_plugin_target_properties shared_code_target kind)
|
||||
"${script_file}"
|
||||
JUCE_UNITY_COPY_DIR)
|
||||
endif()
|
||||
elseif(kind STREQUAL "LV2")
|
||||
set_target_properties(${target_name} PROPERTIES BUNDLE FALSE)
|
||||
|
||||
get_target_property(JUCE_LV2URI "${shared_code_target}" JUCE_LV2URI)
|
||||
|
||||
if(NOT JUCE_LV2URI MATCHES "https?://.*")
|
||||
message(WARNING
|
||||
"LV2URI should be well-formed with an 'http' prefix. "
|
||||
"Check the LV2URI argument to juce_add_plugin.")
|
||||
endif()
|
||||
|
||||
set(source_header "${JUCE_CMAKE_UTILS_DIR}/JuceLV2Defines.h.in")
|
||||
get_target_property(juce_library_code "${shared_code_target}" JUCE_GENERATED_SOURCES_DIRECTORY)
|
||||
configure_file("${source_header}" "${juce_library_code}/JuceLV2Defines.h")
|
||||
|
||||
set(output_path "${products_folder}/${product_name}.lv2")
|
||||
set_target_properties(${target_name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${output_path}")
|
||||
|
||||
add_custom_command(TARGET ${target_name} POST_BUILD
|
||||
COMMAND juce::juce_lv2_helper "$<TARGET_FILE:${target_name}>"
|
||||
VERBATIM)
|
||||
|
||||
_juce_set_copy_properties(${shared_code_target} ${target_name} "${output_path}" JUCE_LV2_COPY_DIR)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@ -1004,6 +1054,8 @@ function(_juce_get_plugin_kind_name kind out_var)
|
||||
set(${out_var} "AUv3 AppExtension" PARENT_SCOPE)
|
||||
elseif(kind STREQUAL "AAX")
|
||||
set(${out_var} "AAX" PARENT_SCOPE)
|
||||
elseif(kind STREQUAL "LV2")
|
||||
set(${out_var} "LV2" PARENT_SCOPE)
|
||||
elseif(kind STREQUAL "Standalone")
|
||||
set(${out_var} "Standalone Plugin" PARENT_SCOPE)
|
||||
elseif(kind STREQUAL "Unity")
|
||||
@ -1064,7 +1116,10 @@ function(_juce_link_plugin_wrapper shared_code_target kind)
|
||||
|
||||
add_dependencies(${shared_code_target}_All ${target_name})
|
||||
|
||||
_juce_configure_bundle(${shared_code_target} ${target_name})
|
||||
if(NOT kind STREQUAL "LV2")
|
||||
_juce_configure_bundle(${shared_code_target} ${target_name})
|
||||
endif()
|
||||
|
||||
_juce_set_plugin_target_properties(${shared_code_target} ${kind})
|
||||
endfunction()
|
||||
|
||||
@ -1183,7 +1238,13 @@ function(_juce_configure_plugin_targets target)
|
||||
JucePlugin_AAXDisableBypass=$<BOOL:$<TARGET_PROPERTY:${target},JUCE_DISABLE_AAX_BYPASS>>
|
||||
JucePlugin_AAXDisableMultiMono=$<BOOL:$<TARGET_PROPERTY:${target},JUCE_DISABLE_AAX_MULTI_MONO>>
|
||||
JucePlugin_VSTNumMidiInputs=$<TARGET_PROPERTY:${target},JUCE_VST_NUM_MIDI_INS>
|
||||
JucePlugin_VSTNumMidiOutputs=$<TARGET_PROPERTY:${target},JUCE_VST_NUM_MIDI_OUTS>)
|
||||
JucePlugin_VSTNumMidiOutputs=$<TARGET_PROPERTY:${target},JUCE_VST_NUM_MIDI_OUTS>
|
||||
JucePlugin_Enable_ARA=$<BOOL:$<TARGET_PROPERTY:${target},JUCE_IS_ARA_EFFECT>>
|
||||
JucePlugin_ARAFactoryID=$<TARGET_PROPERTY:${target},JUCE_ARA_FACTORY_ID>
|
||||
JucePlugin_ARADocumentArchiveID=$<TARGET_PROPERTY:${target},JUCE_ARA_DOCUMENT_ARCHIVE_ID>
|
||||
JucePlugin_ARACompatibleArchiveIDs=$<TARGET_PROPERTY:${target},JUCE_ARA_COMPATIBLE_ARCHIVE_IDS>
|
||||
JucePlugin_ARAContentTypes=$<TARGET_PROPERTY:${target},JUCE_ARA_ANALYSIS_TYPES>
|
||||
JucePlugin_ARATransformationFlags=$<TARGET_PROPERTY:${target},JUCE_ARA_TRANSFORMATION_FLAGS>)
|
||||
|
||||
set_target_properties(${target} PROPERTIES
|
||||
POSITION_INDEPENDENT_CODE TRUE
|
||||
@ -1283,10 +1344,11 @@ function(_juce_set_fallback_properties target)
|
||||
_juce_set_property_if_not_set(${target} BUILD_VERSION "${final_version}")
|
||||
|
||||
get_target_property(custom_xcassets ${target} JUCE_CUSTOM_XCASSETS_FOLDER)
|
||||
get_target_property(custom_storyboard ${target} JUCE_LAUNCH_STORYBOARD_FILE)
|
||||
|
||||
set(needs_storyboard TRUE)
|
||||
|
||||
if(custom_xcassets)
|
||||
if((NOT custom_storyboard) AND custom_xcassets AND (EXISTS "${custom_xcassets}/LaunchImage.launchimage"))
|
||||
set(needs_storyboard FALSE)
|
||||
endif()
|
||||
|
||||
@ -1458,6 +1520,90 @@ function(_juce_set_fallback_properties target)
|
||||
if(NOT aax_category_int STREQUAL "")
|
||||
set_target_properties(${target} PROPERTIES JUCE_AAX_CATEGORY ${aax_category_int})
|
||||
endif()
|
||||
|
||||
# Ensure this matches the Projucer implementation
|
||||
get_target_property(company_website ${target} JUCE_COMPANY_WEBSITE)
|
||||
get_target_property(plugin_name ${target} JUCE_PLUGIN_NAME)
|
||||
string(MAKE_C_IDENTIFIER "${plugin_name}" plugin_name_sanitised)
|
||||
_juce_set_property_if_not_set(${target} LV2URI "${company_website}/plugins/${plugin_name_sanitised}")
|
||||
|
||||
# ARA configuration
|
||||
# Analysis types
|
||||
set(ara_analysis_type_strings
|
||||
kARAContentTypeNotes
|
||||
kARAContentTypeTempoEntries
|
||||
kARAContentTypeBarSignatures
|
||||
kARAContentTypeStaticTuning
|
||||
kARAContentTypeKeySignatures
|
||||
kARAContentTypeSheetChords)
|
||||
|
||||
get_target_property(actual_ara_analysis_types ${target} JUCE_ARA_ANALYSIS_TYPES)
|
||||
|
||||
set(ara_analysis_types_int "")
|
||||
|
||||
foreach(category_string IN LISTS actual_ara_analysis_types)
|
||||
list(FIND ara_analysis_type_strings ${category_string} ara_index)
|
||||
|
||||
if(ara_index GREATER_EQUAL 0)
|
||||
set(ara_analysis_types_bit "1 << ${ara_index}")
|
||||
|
||||
if(ara_analysis_types_int STREQUAL "")
|
||||
set(ara_analysis_types_int 0)
|
||||
endif()
|
||||
|
||||
math(EXPR ara_analysis_types_int "${ara_analysis_types_int} | (${ara_analysis_types_bit})")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(NOT ara_analysis_types_int STREQUAL "")
|
||||
set_target_properties(${target} PROPERTIES JUCE_ARA_ANALYSIS_TYPES ${ara_analysis_types_int})
|
||||
endif()
|
||||
|
||||
_juce_set_property_if_not_set(${target} ARA_ANALYSIS_TYPES 0)
|
||||
|
||||
# Transformation flags
|
||||
set(ara_transformation_flags_strings
|
||||
kARAPlaybackTransformationNoChanges
|
||||
kARAPlaybackTransformationTimestretch
|
||||
kARAPlaybackTransformationTimestretchReflectingTempo
|
||||
kARAPlaybackTransformationContentBasedFadeAtTail
|
||||
kARAPlaybackTransformationContentBasedFadeAtHead)
|
||||
|
||||
set(default_ara_transformation_flags kARAPlaybackTransformationNoChanges)
|
||||
|
||||
_juce_set_property_if_not_set(${target} ARA_TRANSFORMATION_FLAGS ${default_ara_transformation_flags})
|
||||
|
||||
get_target_property(actual_ara_transformation_flags ${target} JUCE_ARA_TRANSFORMATION_FLAGS)
|
||||
|
||||
set(ara_transformation_flags_int "")
|
||||
|
||||
foreach(transformation_string IN LISTS actual_ara_transformation_flags)
|
||||
list(FIND ara_transformation_flags_strings ${transformation_string} ara_transformation_index)
|
||||
|
||||
if(ara_transformation_index GREATER_EQUAL 0)
|
||||
if(ara_transformation_index EQUAL 0)
|
||||
set(ara_transformation_bit 0)
|
||||
else()
|
||||
set(ara_transformation_bit "1 << (${ara_transformation_index} - 1)")
|
||||
endif()
|
||||
|
||||
if(ara_transformation_flags_int STREQUAL "")
|
||||
set(ara_transformation_flags_int 0)
|
||||
endif()
|
||||
|
||||
math(EXPR ara_transformation_flags_int "${ara_transformation_flags_int} | (${ara_transformation_bit})")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(NOT ara_transformation_flags_int STREQUAL "")
|
||||
set_target_properties(${target} PROPERTIES JUCE_ARA_TRANSFORMATION_FLAGS ${ara_transformation_flags_int})
|
||||
endif()
|
||||
|
||||
_juce_set_property_if_not_set(${target} IS_ARA_EFFECT FALSE)
|
||||
get_target_property(final_bundle_id ${target} JUCE_BUNDLE_ID)
|
||||
_juce_set_property_if_not_set(${target} ARA_FACTORY_ID "\"${final_bundle_id}.arafactory.${final_version}\"")
|
||||
_juce_set_property_if_not_set(${target} ARA_DOCUMENT_ARCHIVE_ID "\"${final_bundle_id}.aradocumentarchive.1\"")
|
||||
_juce_set_property_if_not_set(${target} ARA_COMPATIBLE_ARCHIVE_IDS "\"\"")
|
||||
endfunction()
|
||||
|
||||
# ==================================================================================================
|
||||
@ -1524,6 +1670,10 @@ function(_juce_initialise_target target)
|
||||
SUPPRESS_AU_PLIST_RESOURCE_USAGE
|
||||
PLUGINHOST_AU # Set this true if you want to host AU plugins
|
||||
USE_LEGACY_COMPATIBILITY_PLUGIN_CODE
|
||||
LV2URI
|
||||
IS_ARA_EFFECT
|
||||
ARA_FACTORY_ID
|
||||
ARA_DOCUMENT_ARCHIVE_ID
|
||||
|
||||
VST_COPY_DIR
|
||||
VST3_COPY_DIR
|
||||
@ -1537,11 +1687,18 @@ function(_juce_initialise_target target)
|
||||
VST3_CATEGORIES
|
||||
HARDENED_RUNTIME_OPTIONS
|
||||
APP_SANDBOX_OPTIONS
|
||||
APP_SANDBOX_FILE_ACCESS_HOME_RO
|
||||
APP_SANDBOX_FILE_ACCESS_HOME_RW
|
||||
APP_SANDBOX_FILE_ACCESS_ABS_RO
|
||||
APP_SANDBOX_FILE_ACCESS_ABS_RW
|
||||
DOCUMENT_EXTENSIONS
|
||||
AAX_CATEGORY
|
||||
IPHONE_SCREEN_ORIENTATIONS # iOS only
|
||||
IPAD_SCREEN_ORIENTATIONS # iOS only
|
||||
APP_GROUP_IDS) # iOS only
|
||||
APP_GROUP_IDS # iOS only
|
||||
ARA_COMPATIBLE_ARCHIVE_IDS
|
||||
ARA_ANALYSIS_TYPES
|
||||
ARA_TRANSFORMATION_FLAGS)
|
||||
|
||||
cmake_parse_arguments(JUCE_ARG "" "${one_value_args}" "${multi_value_args}" ${ARGN})
|
||||
|
||||
@ -1611,18 +1768,7 @@ function(_juce_initialise_target target)
|
||||
|
||||
_juce_write_generate_time_info(${target})
|
||||
_juce_link_optional_libraries(${target})
|
||||
|
||||
if(JUCE_ENABLE_MODULE_SOURCE_GROUPS)
|
||||
get_property(all_modules GLOBAL PROPERTY _juce_module_names)
|
||||
|
||||
foreach(module_name IN LISTS all_modules)
|
||||
get_target_property(path ${module_name} INTERFACE_JUCE_MODULE_PATH)
|
||||
get_target_property(header_files ${module_name} INTERFACE_JUCE_MODULE_HEADERS)
|
||||
get_target_property(source_files ${module_name} INTERFACE_JUCE_MODULE_SOURCES)
|
||||
source_group(TREE ${path} PREFIX "JUCE Modules" FILES ${header_files} ${source_files})
|
||||
set_source_files_properties(${header_files} PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
endforeach()
|
||||
endif()
|
||||
_juce_fixup_module_source_groups()
|
||||
endfunction()
|
||||
|
||||
# ==================================================================================================
|
||||
@ -1746,27 +1892,49 @@ function(juce_add_pip header)
|
||||
NEEDS_STORE_KIT TRUE)
|
||||
endif()
|
||||
|
||||
if("JUCE_PLUGINHOST_AU=1" IN_LIST pip_moduleflags)
|
||||
list(APPEND extra_target_args PLUGINHOST_AU TRUE)
|
||||
endif()
|
||||
|
||||
if(pip_kind STREQUAL "AudioProcessor")
|
||||
set(source_main "${JUCE_CMAKE_UTILS_DIR}/PIPAudioProcessor.cpp.in")
|
||||
_juce_get_metadata("${metadata_dict}" documentControllerClass JUCE_PIP_DOCUMENTCONTROLLER_CLASS)
|
||||
|
||||
# We add AAX/VST2 targets too, if the user has set up those SDKs
|
||||
if(JUCE_PIP_DOCUMENTCONTROLLER_CLASS)
|
||||
if(NOT TARGET juce_ara_sdk)
|
||||
message(WARNING
|
||||
"${header} specifies a documentControllerClass, but the ARA SDK could not be located. "
|
||||
"Use juce_set_ara_sdk_path to specify the ARA SDK location. "
|
||||
"This PIP will not be configured.")
|
||||
endif()
|
||||
|
||||
set(extra_formats)
|
||||
set(source_main "${JUCE_CMAKE_UTILS_DIR}/PIPAudioProcessorWithARA.cpp.in")
|
||||
|
||||
if(TARGET juce_aax_sdk)
|
||||
list(APPEND extra_formats AAX)
|
||||
juce_add_plugin(${JUCE_PIP_NAME}
|
||||
FORMATS AU VST3
|
||||
IS_ARA_EFFECT TRUE
|
||||
${extra_target_args})
|
||||
else()
|
||||
set(source_main "${JUCE_CMAKE_UTILS_DIR}/PIPAudioProcessor.cpp.in")
|
||||
|
||||
# We add AAX/VST2 targets too, if the user has set up those SDKs
|
||||
|
||||
set(extra_formats)
|
||||
|
||||
if(TARGET juce_aax_sdk)
|
||||
list(APPEND extra_formats AAX)
|
||||
endif()
|
||||
|
||||
if(TARGET juce_vst2_sdk)
|
||||
list(APPEND extra_formats VST)
|
||||
endif()
|
||||
|
||||
# Standalone plugins might want to access the mic
|
||||
list(APPEND extra_target_args MICROPHONE_PERMISSION_ENABLED TRUE)
|
||||
|
||||
juce_add_plugin(${JUCE_PIP_NAME}
|
||||
FORMATS AU AUv3 LV2 Standalone Unity VST3 ${extra_formats}
|
||||
${extra_target_args})
|
||||
endif()
|
||||
|
||||
if(TARGET juce_vst2_sdk)
|
||||
list(APPEND extra_formats VST)
|
||||
endif()
|
||||
|
||||
# Standalone plugins might want to access the mic
|
||||
list(APPEND extra_target_args MICROPHONE_PERMISSION_ENABLED TRUE)
|
||||
|
||||
juce_add_plugin(${JUCE_PIP_NAME}
|
||||
FORMATS AU AUv3 VST3 Unity Standalone ${extra_formats}
|
||||
${extra_target_args})
|
||||
elseif(pip_kind STREQUAL "Component")
|
||||
set(source_main "${JUCE_CMAKE_UTILS_DIR}/PIPComponent.cpp.in")
|
||||
juce_add_gui_app(${JUCE_PIP_NAME} ${extra_target_args})
|
||||
@ -1918,6 +2086,22 @@ function(juce_set_vst3_sdk_path path)
|
||||
target_include_directories(juce_vst3_sdk INTERFACE "${path}")
|
||||
endfunction()
|
||||
|
||||
function(juce_set_ara_sdk_path path)
|
||||
if(TARGET juce_ara_sdk)
|
||||
message(FATAL_ERROR "juce_set_ara_sdk_path should only be called once")
|
||||
endif()
|
||||
|
||||
_juce_make_absolute(path)
|
||||
|
||||
if(NOT EXISTS "${path}")
|
||||
message(FATAL_ERROR "Could not find ARA SDK at the specified path: ${path}")
|
||||
endif()
|
||||
|
||||
add_library(juce_ara_sdk INTERFACE IMPORTED GLOBAL)
|
||||
|
||||
target_include_directories(juce_ara_sdk INTERFACE "${path}")
|
||||
endfunction()
|
||||
|
||||
# ==================================================================================================
|
||||
|
||||
function(juce_disable_default_flags)
|
||||
|
5
deps/juce/extras/Build/CMake/JuceLV2Defines.h.in
vendored
Normal file
5
deps/juce/extras/Build/CMake/JuceLV2Defines.h.in
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef JucePlugin_LV2URI
|
||||
#define JucePlugin_LV2URI "${JUCE_LV2URI}"
|
||||
#endif
|
23
deps/juce/extras/Build/CMake/PIPAudioProcessorWithARA.cpp.in
vendored
Normal file
23
deps/juce/extras/Build/CMake/PIPAudioProcessorWithARA.cpp.in
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file was auto-generated and contains the startup code for a PIP.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#include <JuceHeader.h>
|
||||
#include "${JUCE_PIP_HEADER}"
|
||||
|
||||
//==============================================================================
|
||||
juce::AudioProcessor* JUCE_CALLTYPE createPluginFilter()
|
||||
{
|
||||
return new ${JUCE_PIP_MAIN_CLASS}();
|
||||
}
|
||||
|
||||
#if JucePlugin_Enable_ARA
|
||||
const ARA::ARAFactory* JUCE_CALLTYPE createARAFactory()
|
||||
{
|
||||
return juce::ARADocumentControllerSpecialisation::createARAFactory<${JUCE_PIP_DOCUMENTCONTROLLER_CLASS}>();
|
||||
}
|
||||
#endif
|
37
deps/juce/extras/Build/CMake/checkBundleSigning.cmake
vendored
Normal file
37
deps/juce/extras/Build/CMake/checkBundleSigning.cmake
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
# ==============================================================================
|
||||
#
|
||||
# This file is part of the JUCE library.
|
||||
# Copyright (c) 2022 - Raw Material Software Limited
|
||||
#
|
||||
# JUCE is an open source library subject to commercial or open-source
|
||||
# licensing.
|
||||
#
|
||||
# By using JUCE, you agree to the terms of both the JUCE 7 End-User License
|
||||
# Agreement and JUCE Privacy Policy.
|
||||
#
|
||||
# End User License Agreement: www.juce.com/juce-7-licence
|
||||
# Privacy Policy: www.juce.com/juce-privacy-policy
|
||||
#
|
||||
# Or: You may also use this code under the terms of the GPL v3 (see
|
||||
# www.gnu.org/licenses).
|
||||
#
|
||||
# JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
|
||||
# EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
|
||||
# DISCLAIMED.
|
||||
#
|
||||
# ==============================================================================
|
||||
|
||||
find_program(JUCE_XCRUN xcrun)
|
||||
|
||||
if(NOT JUCE_XCRUN)
|
||||
return()
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND "${JUCE_XCRUN}" codesign --verify "${src}"
|
||||
RESULT_VARIABLE result)
|
||||
|
||||
if(result)
|
||||
message(STATUS "Replacing invalid signature with ad-hoc signature")
|
||||
execute_process(COMMAND "${JUCE_XCRUN}" codesign -s - "${src}")
|
||||
endif()
|
8
deps/juce/extras/Build/CMake/copyDir.cmake
vendored
8
deps/juce/extras/Build/CMake/copyDir.cmake
vendored
@ -1,15 +1,15 @@
|
||||
# ==============================================================================
|
||||
#
|
||||
# This file is part of the JUCE library.
|
||||
# Copyright (c) 2020 - Raw Material Software Limited
|
||||
# Copyright (c) 2022 - Raw Material Software Limited
|
||||
#
|
||||
# JUCE is an open source library subject to commercial or open-source
|
||||
# licensing.
|
||||
#
|
||||
# By using JUCE, you agree to the terms of both the JUCE 6 End-User License
|
||||
# Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
|
||||
# By using JUCE, you agree to the terms of both the JUCE 7 End-User License
|
||||
# Agreement and JUCE Privacy Policy.
|
||||
#
|
||||
# End User License Agreement: www.juce.com/juce-6-licence
|
||||
# End User License Agreement: www.juce.com/juce-7-licence
|
||||
# Privacy Policy: www.juce.com/juce-privacy-policy
|
||||
#
|
||||
# Or: You may also use this code under the terms of the GPL v3 (see
|
||||
|
@ -1,57 +1,82 @@
|
||||
#if defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM) || defined(_M_ARM64) || defined(__aarch64__) || defined(__ARM64__)
|
||||
|
||||
#if defined(_M_ARM64) || defined(__aarch64__) || defined(__ARM64__)
|
||||
#error JUCE_ARCH aarch64
|
||||
#elif (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM == 8) || defined(__ARMv8__) || defined(__ARMv8_A__)
|
||||
#error JUCE_ARCH armv8l
|
||||
#elif (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM == 7) || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(_ARM_ARCH_7) || defined(__CORE_CORTEXA__)
|
||||
#error JUCE_ARCH armv7l
|
||||
#elif (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM == 6) || defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6M__)
|
||||
#error JUCE_ARCH armv6l
|
||||
#elif (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM == 5) || defined(__ARM_ARCH_5TEJ__)
|
||||
#error JUCE_ARCH armv5l
|
||||
#else
|
||||
#error JUCE_ARCH arm
|
||||
#endif
|
||||
|
||||
#elif defined(__i386) || defined(__i386__) || defined(_M_IX86)
|
||||
|
||||
#error JUCE_ARCH i386
|
||||
|
||||
#elif defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64)
|
||||
|
||||
#error JUCE_ARCH x86_64
|
||||
|
||||
#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
|
||||
|
||||
#error JUCE_ARCH ia64
|
||||
|
||||
#elif defined(__mips) || defined(__mips__) || defined(_M_MRX000)
|
||||
|
||||
#if defined(_MIPS_ARCH_MIPS64) || defined(__mips64)
|
||||
#error JUCE_ARCH mips64
|
||||
#else
|
||||
#error JUCE_ARCH mips
|
||||
#endif
|
||||
|
||||
#elif defined(__ppc__) || defined(__ppc) || defined(__powerpc__) || defined(_ARCH_COM) || defined(_ARCH_PWR) || defined(_ARCH_PPC) || defined(_M_MPPC) || defined(_M_PPC)
|
||||
|
||||
#if defined(__ppc64__) || defined(__powerpc64__) || defined(__64BIT__)
|
||||
#error JUCE_ARCH ppc64
|
||||
#else
|
||||
#error JUCE_ARCH ppc
|
||||
#endif
|
||||
|
||||
#elif defined(__riscv)
|
||||
|
||||
#if __riscv_xlen == 64
|
||||
#error JUCE_ARCH riscv64
|
||||
#else
|
||||
#error JUCE_ARCH riscv
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#error JUCE_ARCH unknown
|
||||
|
||||
#endif
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library.
|
||||
Copyright (c) 2022 - Raw Material Software Limited
|
||||
|
||||
JUCE is an open source library subject to commercial or open-source
|
||||
licensing.
|
||||
|
||||
By using JUCE, you agree to the terms of both the JUCE 7 End-User License
|
||||
Agreement and JUCE Privacy Policy.
|
||||
|
||||
End User License Agreement: www.juce.com/juce-7-licence
|
||||
Privacy Policy: www.juce.com/juce-privacy-policy
|
||||
|
||||
Or: You may also use this code under the terms of the GPL v3 (see
|
||||
www.gnu.org/licenses).
|
||||
|
||||
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
|
||||
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
|
||||
DISCLAIMED.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#if defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM) || defined(_M_ARM64) || defined(__aarch64__) || defined(__ARM64__)
|
||||
|
||||
#if defined(_M_ARM64) || defined(__aarch64__) || defined(__ARM64__)
|
||||
#error JUCE_ARCH aarch64
|
||||
#elif (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM == 8) || defined(__ARMv8__) || defined(__ARMv8_A__)
|
||||
#error JUCE_ARCH armv8l
|
||||
#elif (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM == 7) || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(_ARM_ARCH_7) || defined(__CORE_CORTEXA__)
|
||||
#error JUCE_ARCH armv7l
|
||||
#elif (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM == 6) || defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6M__)
|
||||
#error JUCE_ARCH armv6l
|
||||
#elif (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM == 5) || defined(__ARM_ARCH_5TEJ__)
|
||||
#error JUCE_ARCH armv5l
|
||||
#else
|
||||
#error JUCE_ARCH arm
|
||||
#endif
|
||||
|
||||
#elif defined(__i386) || defined(__i386__) || defined(_M_IX86)
|
||||
|
||||
#error JUCE_ARCH i386
|
||||
|
||||
#elif defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64)
|
||||
|
||||
#error JUCE_ARCH x86_64
|
||||
|
||||
#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
|
||||
|
||||
#error JUCE_ARCH ia64
|
||||
|
||||
#elif defined(__mips) || defined(__mips__) || defined(_M_MRX000)
|
||||
|
||||
#if defined(_MIPS_ARCH_MIPS64) || defined(__mips64)
|
||||
#error JUCE_ARCH mips64
|
||||
#else
|
||||
#error JUCE_ARCH mips
|
||||
#endif
|
||||
|
||||
#elif defined(__ppc__) || defined(__ppc) || defined(__powerpc__) || defined(_ARCH_COM) || defined(_ARCH_PWR) || defined(_ARCH_PPC) || defined(_M_MPPC) || defined(_M_PPC)
|
||||
|
||||
#if defined(__ppc64__) || defined(__powerpc64__) || defined(__64BIT__)
|
||||
#error JUCE_ARCH ppc64
|
||||
#else
|
||||
#error JUCE_ARCH ppc
|
||||
#endif
|
||||
|
||||
#elif defined(__riscv)
|
||||
|
||||
#if __riscv_xlen == 64
|
||||
#error JUCE_ARCH riscv64
|
||||
#else
|
||||
#error JUCE_ARCH riscv
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#error JUCE_ARCH unknown
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user