-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fluidsynth] Update patch and portfile (#29636)
* [fluidsynth] Update gentables patch. Installation of FluidSynthTargets.cmake was accidentally turned off with the previous version of the patch. * [fluidsynth] Update portfile. - Remove manpages. - vcpkg_copy_tools already cleans up the bin directories - Copy pdbs after moving the tools. - Remove `enable-debug` as it no longer exists. * [fluidsynth] Install usage. * [fluidsynth] Bump port version. * [fluidsynth] Update baseline. * [fluidsynth] Find dependencies in the config file. The library dependencies of `FluidSynth::libfluidsynth-OBJ` were not searched for in the Config file. * [fluidsynth] Update version. * [fluidsynth] Apply suggestion from review. Do not set `VCPKG_BUILD_MAKE_TABLES` in the patch. * [fluidsynth] Update version. * [fluidsynth] Update patch. - Avoid using REQUIRED to find packages. - Check for ALSA on Linux. - Provide versions for pkg-config modules. * [fluidsynth] Update version.
- Loading branch information
1 parent
a1b1c72
commit ce8d96a
Showing
7 changed files
with
55 additions
and
32 deletions.
There are no files selected for viewing
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,22 @@ | ||
diff --git a/FluidSynthConfig.cmake.in b/FluidSynthConfig.cmake.in | ||
index 1ffdf598..0be65e0e 100644 | ||
--- a/FluidSynthConfig.cmake.in | ||
+++ b/FluidSynthConfig.cmake.in | ||
@@ -6,5 +6,17 @@ | ||
# define variables for configuration options: | ||
# set(network-enabled @enable-network@) | ||
|
||
+include(CMakeFindDependencyMacro) | ||
+find_dependency(OpenMP COMPONENTS C) | ||
+find_dependency(PkgConfig) | ||
+pkg_check_modules(GLIB IMPORTED_TARGET glib-2.0>=2.6.5 gthread-2.0>=2.6.5) | ||
+set(ALSA_SUPPORT @ALSA_SUPPORT@) | ||
+if(ALSA_SUPPORT) | ||
+ pkg_check_modules(ALSA IMPORTED_TARGET alsa>=0.9.1) | ||
+endif() | ||
+set(LIBSNDFILE_SUPPORT @LIBSNDFILE_SUPPORT@) | ||
+if(LIBSNDFILE_SUPPORT) | ||
+ pkg_check_modules(LIBSNDFILE IMPORTED_TARGET sndfile>=1.0.0) | ||
+endif() | ||
# finally, include the targets file | ||
include("${CMAKE_CURRENT_LIST_DIR}/FluidSynthTargets.cmake") |
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 |
---|---|---|
@@ -1,59 +1,51 @@ | ||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index e86a642..426d9e8 100644 | ||
index e86a6429..9240e091 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -520,6 +520,11 @@ else ( MACOSX_FRAMEWORK ) | ||
install ( FILES ${public_main_HEADER} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) | ||
endif ( MACOSX_FRAMEWORK ) | ||
@@ -538,6 +538,9 @@ install(EXPORT FluidSynthTargets | ||
|
||
# ******* Auto Generated Lookup Tables ****** | ||
|
||
+option(VCPKG_BUILD_MAKE_TABLES "Build `make_tables`" OFF) | ||
+if(VCPKG_BUILD_MAKE_TABLES) | ||
+ add_subdirectory(gentables) | ||
+elseif(0) | ||
+ | ||
# Exported targets. | ||
include(ExternalProject) | ||
|
||
# build_interface: for the libfluidsynth target when imported from the build directory. | ||
@@ -557,4 +562,13 @@ ExternalProject_Add(gentables | ||
set (GENTAB_SDIR ${CMAKE_CURRENT_SOURCE_DIR}/gentables) | ||
@@ -557,4 +560,11 @@ ExternalProject_Add(gentables | ||
"${CMAKE_COMMAND}" --build "${GENTAB_BDIR}" | ||
INSTALL_COMMAND ${GENTAB_BDIR}/make_tables.exe "${FluidSynth_BINARY_DIR}/" | ||
) | ||
+ | ||
+endif() | ||
+if(TARGET make_tables AND NOT CMAKE_CROSSCOMPILING) | ||
+ set(GENTABLES make_tables) | ||
+else() | ||
+ find_program(GENTABLES make_tables REQUIRED) | ||
+endif() | ||
+add_custom_target(gentables COMMAND "${GENTABLES}" "${CMAKE_BINARY_DIR}/") | ||
+ | ||
add_dependencies(libfluidsynth-OBJ gentables) | ||
diff --git a/src/gentables/CMakeLists.txt b/src/gentables/CMakeLists.txt | ||
index 9cb69f2..b88d1d6 100644 | ||
index 9cb69f2b..c393a670 100644 | ||
--- a/src/gentables/CMakeLists.txt | ||
+++ b/src/gentables/CMakeLists.txt | ||
@@ -12,6 +12,8 @@ unset(ENV{LDFLAGS}) | ||
@@ -12,6 +12,7 @@ unset(ENV{LDFLAGS}) | ||
|
||
project (gentables C) | ||
|
||
+if (0) | ||
+ | ||
set ( CMAKE_BUILD_TYPE Debug ) | ||
|
||
# hardcode ".exe" as suffix to the binary, else in case of cross-platform cross-compiling the calling cmake will not know the suffix used here and fail to find the binary | ||
@@ -21,6 +23,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) | ||
@@ -20,6 +21,7 @@ set ( CMAKE_EXECUTABLE_SUFFIX ".exe" ) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}) | ||
|
||
+endif() | ||
+ | ||
# Add the executable that generates the table | ||
add_executable( make_tables | ||
make_tables.c | ||
@@ -34,3 +38,5 @@ if ( WIN32 ) | ||
@@ -34,3 +36,4 @@ if ( WIN32 ) | ||
else ( WIN32 ) | ||
target_link_libraries (make_tables "m") | ||
endif () | ||
+ | ||
+install(TARGETS make_tables DESTINATION bin) | ||
|
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,5 @@ | ||
The package fluidsynth provides CMake targets: | ||
|
||
find_package(FluidSynth CONFIG REQUIRED) | ||
target_link_libraries(main PRIVATE FluidSynth::libfluidsynth) | ||
add_custom_command(OUTPUT result COMMAND FluidSynth::fluidsynth ARGS ...) |
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
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