-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[juce] Fix cross builds, cleanup (#42615)
- Loading branch information
Showing
19 changed files
with
490 additions
and
195 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/extras/Build/CMake/JUCEModuleSupport.cmake b/extras/Build/CMake/JUCEModuleSupport.cmake | ||
index afefe2d..2dd2ecf 100644 | ||
--- a/extras/Build/CMake/JUCEModuleSupport.cmake | ||
+++ b/extras/Build/CMake/JUCEModuleSupport.cmake | ||
@@ -603,8 +603,10 @@ function(juce_add_module module_path) | ||
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) | ||
+ find_path(JUCE_OBOE_INCLUDE_DIR NAMES oboe/Oboe.h REQUIRED) | ||
+ target_include_directories(${module_name} INTERFACE "${JUCE_OBOE_INCLUDE_DIR}") | ||
+ find_library(JUCE_OBOE_LIBRARY NAMES oboe REQUIRED) | ||
+ target_link_libraries(${module_name} INTERFACE "${JUCE_OBOE_LIBRARY}" log OpenSLES) | ||
endif() | ||
|
||
if((${module_name} STREQUAL "juce_opengl") AND (CMAKE_SYSTEM_NAME STREQUAL "Android")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/modules/juce_graphics/juce_graphics_Harfbuzz.cpp b/modules/juce_graphics/juce_graphics_Harfbuzz.cpp | ||
index a491af9..44e934a 100644 | ||
--- a/modules/juce_graphics/juce_graphics_Harfbuzz.cpp | ||
+++ b/modules/juce_graphics/juce_graphics_Harfbuzz.cpp | ||
@@ -84,7 +84,6 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations", | ||
// -Wexpansion-to-defined on gcc 7. There's no way to turn that warning off | ||
// locally, so we sidestep it. | ||
#if ! defined(__has_builtin) && defined(__GNUC__) && __GNUC__ >= 5 | ||
- #define __has_builtin(x) 1 | ||
#endif | ||
|
||
#include <utility> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff --git a/extras/CMakeLists.txt b/extras/CMakeLists.txt | ||
index 7f5555e..539f1cb 100644 | ||
--- a/extras/CMakeLists.txt | ||
+++ b/extras/CMakeLists.txt | ||
@@ -35,5 +35,14 @@ add_subdirectory(AudioPerformanceTest) | ||
add_subdirectory(AudioPluginHost) | ||
add_subdirectory(BinaryBuilder) | ||
add_subdirectory(NetworkGraphicsDemo) | ||
+if(NOT ANDROID AND NOT IOS) | ||
add_subdirectory(Projucer) | ||
+endif() | ||
add_subdirectory(UnitTestRunner) | ||
+ | ||
+file(GLOB tools RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*") | ||
+foreach(tool IN LISTS tools) | ||
+ if(TARGET "${tool}") | ||
+ install(TARGETS "${tool}" DESTINATION "${JUCE_TOOL_INSTALL_DIR}") | ||
+ endif() | ||
+endforeach() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 49d85c6..76209f5 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -1,3 +1,5 @@ | ||
+# Save cmake input for nested juceaide build | ||
+get_cmake_property(vcpkg_input_vars CACHE_VARIABLES) | ||
# ============================================================================== | ||
# | ||
# This file is part of the JUCE framework. | ||
@@ -142,7 +144,10 @@ set(JUCE_INSTALL_DESTINATION "lib/cmake/JUCE-${JUCE_VERSION}" CACHE STRING | ||
|
||
set(JUCE_MODULE_PATH "include/JUCE-${JUCE_VERSION}/modules") | ||
set(UTILS_INSTALL_DIR "${JUCE_INSTALL_DESTINATION}") | ||
-set(JUCEAIDE_PATH "${JUCE_TOOL_INSTALL_DIR}/${JUCE_JUCEAIDE_NAME}") | ||
+set(JUCEAIDE_PATH "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/juce/${JUCE_JUCEAIDE_NAME}") | ||
+if(WITH_JUCEAIDE) | ||
+ set(JUCEAIDE_PATH "${WITH_JUCEAIDE}") | ||
+endif() | ||
configure_package_config_file("${JUCE_CMAKE_UTILS_DIR}/JUCEConfig.cmake.in" | ||
"${JUCE_BINARY_DIR}/JUCEConfig.cmake" | ||
PATH_VARS UTILS_INSTALL_DIR JUCEAIDE_PATH JUCE_MODULE_PATH | ||
diff --git a/extras/Build/juceaide/CMakeLists.txt b/extras/Build/juceaide/CMakeLists.txt | ||
index 651aa53..9ff0fba 100644 | ||
--- a/extras/Build/juceaide/CMakeLists.txt | ||
+++ b/extras/Build/juceaide/CMakeLists.txt | ||
@@ -55,12 +55,16 @@ if(JUCE_BUILD_HELPER_TOOLS) | ||
juce::juce_recommended_lto_flags | ||
juce::juce_recommended_warning_flags) | ||
|
||
- set_target_properties(juceaide PROPERTIES | ||
- MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") | ||
|
||
export(TARGETS juceaide | ||
NAMESPACE juce_tools:: | ||
FILE "${JUCE_BINARY_DIR}/JUCEToolsExport.cmake") | ||
+ | ||
+elseif(WITH_JUCEAIDE) | ||
+ add_executable(juceaide IMPORTED GLOBAL) | ||
+ set_target_properties(juceaide PROPERTIES IMPORTED_LOCATION "${WITH_JUCEAIDE}") | ||
+ add_executable(juce::juceaide ALIAS juceaide) | ||
+ | ||
else() | ||
message(STATUS "Configuring juceaide") | ||
|
||
@@ -111,13 +115,18 @@ else() | ||
set(ENV{CMAKE_GENERATOR_PLATFORM} "${CMAKE_HOST_SYSTEM_PROCESSOR}") | ||
endif() | ||
|
||
+ set(options "") | ||
+ list(REMOVE_ITEM vcpkg_input_vars "JUCE_BUILD_EXTRAS") | ||
+ foreach(var IN LISTS vcpkg_input_vars) | ||
+ list(APPEND options "-D${var}=$CACHE{${var}}") | ||
+ endforeach() | ||
# Looks like we're bootstrapping, reinvoke CMake | ||
execute_process(COMMAND "${CMAKE_COMMAND}" | ||
"." | ||
"-B${JUCE_BINARY_DIR}/tools" | ||
"-G${CMAKE_GENERATOR}" | ||
"-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}" | ||
- "-DCMAKE_BUILD_TYPE=Debug" | ||
+ ${options} | ||
"-DJUCE_BUILD_HELPER_TOOLS=ON" | ||
"-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}" | ||
WORKING_DIRECTORY "${JUCE_SOURCE_DIR}" | ||
@@ -133,7 +142,7 @@ else() | ||
|
||
execute_process(COMMAND "${CMAKE_COMMAND}" | ||
--build "${JUCE_BINARY_DIR}/tools" | ||
- --config Debug | ||
+ --target juceaide | ||
OUTPUT_VARIABLE command_output | ||
ERROR_VARIABLE command_output | ||
RESULT_VARIABLE result_variable) | ||
@@ -148,7 +157,7 @@ else() | ||
include("${JUCE_BINARY_DIR}/tools/JUCEToolsExport.cmake") | ||
|
||
add_executable(juceaide IMPORTED GLOBAL) | ||
- get_target_property(imported_location juce_tools::juceaide IMPORTED_LOCATION_DEBUG) | ||
+ get_target_property(imported_location juce_tools::juceaide IMPORTED_LOCATION_RELEASE) | ||
set_target_properties(juceaide PROPERTIES IMPORTED_LOCATION "${imported_location}") | ||
|
||
add_executable(juce::juceaide ALIAS juceaide) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
diff --git a/extras/Build/CMake/JUCEConfig.cmake.in b/extras/Build/CMake/JUCEConfig.cmake.in | ||
index c0c1eef..03a09ef 100644 | ||
--- a/extras/Build/CMake/JUCEConfig.cmake.in | ||
+++ b/extras/Build/CMake/JUCEConfig.cmake.in | ||
@@ -39,6 +39,7 @@ include("@PACKAGE_UTILS_INSTALL_DIR@/JUCEUtils.cmake") | ||
|
||
set(_juce_modules | ||
juce_analytics | ||
+ juce_animation | ||
juce_audio_basics | ||
juce_audio_devices | ||
juce_audio_formats | ||
@@ -55,6 +56,7 @@ set(_juce_modules | ||
juce_gui_basics | ||
juce_gui_extra | ||
juce_javascript | ||
+ juce_midi_ci | ||
juce_opengl | ||
juce_osc | ||
juce_product_unlocking |
Oops, something went wrong.