Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix libinstpatch and sndfile not being discovered on Windows #1299

Merged
merged 12 commits into from
Jan 3, 2024
2 changes: 1 addition & 1 deletion cmake_admin/FindInstPatch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ find_path(

find_library(
InstPatch_LIBRARY
NAMES "instpatch-1.0"
NAMES "instpatch-1.0" "instpatch-2"
HINTS "${PC_INSTPATCH_LIBDIR}")

# Get version from pkg-config or read the config header
Expand Down
4 changes: 2 additions & 2 deletions cmake_admin/FindOpus.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ find_library(

# Get the version from pkg-config
if(PC_OPUS_VERSION)
set(Opus_VERSION "${PC_OPUS_VERSION}")
set(Opus_VERSION "${PC_OPUS_VERSION}.0")
set(OPUS_VERSION "${Opus_VERSION}")
set(OPUS_VERSION_STRING "${Opus_VERSION}")
string(REPLACE "." ";" _opus_version_list "${Opus_VERSION}")
list(GET _opus_version_list 0 OPUS_VERSION_MAJOR)
list(GET _opus_version_list 1 OPUS_VERSION_MINOR)
list(GET _opus_version_list 2 OPUS_VERSION_PATCH)
list(GET _opus_version_list 2 OPUS_VERSION_PATCH) # might be missing if zero, hence adding the .0 above
else()
message(STATUS "Unable to get Opus version without pkg-config.")
set(Opus_VERSION)
Expand Down
5 changes: 3 additions & 2 deletions cmake_admin/FindSndFile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ find_path(

find_library(
_sndfile_library
NAMES "sndfile"
NAMES "sndfile" "sndfile-1"
HINTS "${PC_SNDFILE_LIBDIR}")

# Get version from pkg-config or read the config header
Expand All @@ -69,7 +69,8 @@ elseif(SndFile_INCLUDE_DIR)
endif()

# Check the features SndFile was built with
if(PC_SNDFILE_FOUND)
# 2024-01-02: Recent versions of libsndfile don't seem to provide a pkgconfig file and older version who did are lacking private libraries like OGG.
if(FALSE) #PC_SNDFILE_FOUND
if("vorbis" IN_LIST PC_SNDFILE_STATIC_LIBRARIES)
set(SndFile_WITH_EXTERNAL_LIBS TRUE)
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake_admin/Findmpg123.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ find_package_handle_standard_args(
# Create the targets
foreach(_component libmpg123 libout123 libsyn123)
if(mpg123_${_component}_FOUND AND NOT TARGET MPG123::${_component})
add_library(MPG123::${_component})
add_library(MPG123::${_component} UNKNOWN IMPORTED)
set_target_properties(
MPG123::${_component}
PROPERTIES IMPORTED_LOCATION "${mpg123_${_component}_LIBRARY}"
Expand Down
4 changes: 0 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,6 @@ if ( TARGET PipeWire::PipeWire AND PIPEWIRE_SUPPORT ) # because pw_init() etc.
target_link_libraries ( fluidsynth PRIVATE PipeWire::PipeWire )
endif()

if ( TARGET InstPatch::libinstpatch AND LIBINSTPATCH_SUPPORT )
target_link_libraries ( fluidsynth PRIVATE InstPatch::libinstpatch )
endif()

if ( TARGET LASH::LASH AND LASH_SUPPORT )
target_link_libraries ( fluidsynth PRIVATE LASH::LASH )
endif()
Expand Down
3 changes: 0 additions & 3 deletions src/fluidsynth.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
#define GETOPT_SUPPORT 1
#endif

#ifdef LIBINSTPATCH_SUPPORT
#include <libinstpatch/libinstpatch.h>
#endif
#include "fluid_lash.h"

#ifdef SYSTEMD_SUPPORT
Expand Down
Loading