This commit is contained in:
alexey.lysiuk 2023-04-03 13:33:23 +03:00
commit a510e5acf1
35 changed files with 2088 additions and 130 deletions

View file

@ -101,8 +101,8 @@ class FluidSynthTarget(base.CMakeStaticDependencyTarget):
def prepare_source(self, state: BuildState): def prepare_source(self, state: BuildState):
state.download_source( state.download_source(
'https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v2.3.1.tar.gz', 'https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v2.3.2.tar.gz',
'd734e4cf488be763cf123e5976f3154f0094815093eecdf71e0e9ae148431883') 'cd610810f30566e28fb98c36501f00446a06fa6bae3dc562c8cd3868fe1c0fc7')
def configure(self, state: BuildState): def configure(self, state: BuildState):
opts = state.options opts = state.options
@ -553,8 +553,8 @@ class ZMusicTarget(base.CMakeStaticDependencyTarget):
def prepare_source(self, state: BuildState): def prepare_source(self, state: BuildState):
state.download_source( state.download_source(
'https://github.com/ZDoom/ZMusic/archive/refs/tags/1.1.11.tar.gz', 'https://github.com/ZDoom/ZMusic/archive/refs/tags/1.1.12.tar.gz',
'623c3d7edfcdbe1ba4e7a9dc9a4d834fb92a228881621247855ecd57447631dd') 'da818594b395aa9174561a36362332b0ab8e7906d2e556ec47669326e67613d4')
def detect(self, state: BuildState) -> bool: def detect(self, state: BuildState) -> bool:
return state.has_source_file('include/zmusic.h') return state.has_source_file('include/zmusic.h')

View file

@ -283,6 +283,7 @@ FLUIDSYNTH_API int fluid_player_get_status(fluid_player_t *player);
FLUIDSYNTH_API int fluid_player_get_current_tick(fluid_player_t *player); FLUIDSYNTH_API int fluid_player_get_current_tick(fluid_player_t *player);
FLUIDSYNTH_API int fluid_player_get_total_ticks(fluid_player_t *player); FLUIDSYNTH_API int fluid_player_get_total_ticks(fluid_player_t *player);
FLUIDSYNTH_API int fluid_player_get_bpm(fluid_player_t *player); FLUIDSYNTH_API int fluid_player_get_bpm(fluid_player_t *player);
FLUIDSYNTH_API int fluid_player_get_division(fluid_player_t *player);
FLUIDSYNTH_API int fluid_player_get_midi_tempo(fluid_player_t *player); FLUIDSYNTH_API int fluid_player_get_midi_tempo(fluid_player_t *player);
FLUIDSYNTH_API int fluid_player_seek(fluid_player_t *player, int ticks); FLUIDSYNTH_API int fluid_player_seek(fluid_player_t *player, int ticks);
/** @} */ /** @} */

View file

@ -31,10 +31,10 @@ extern "C" {
* *
* @{ * @{
*/ */
#define FLUIDSYNTH_VERSION "2.3.1" /**< String constant of libfluidsynth version. */ #define FLUIDSYNTH_VERSION "2.3.2" /**< String constant of libfluidsynth version. */
#define FLUIDSYNTH_VERSION_MAJOR 2 /**< libfluidsynth major version integer constant. */ #define FLUIDSYNTH_VERSION_MAJOR 2 /**< libfluidsynth major version integer constant. */
#define FLUIDSYNTH_VERSION_MINOR 3 /**< libfluidsynth minor version integer constant. */ #define FLUIDSYNTH_VERSION_MINOR 3 /**< libfluidsynth minor version integer constant. */
#define FLUIDSYNTH_VERSION_MICRO 1 /**< libfluidsynth micro version integer constant. */ #define FLUIDSYNTH_VERSION_MICRO 2 /**< libfluidsynth micro version integer constant. */
FLUIDSYNTH_API void fluid_version(int *major, int *minor, int *micro); FLUIDSYNTH_API void fluid_version(int *major, int *minor, int *micro);
FLUIDSYNTH_API char* fluid_version_str(void); FLUIDSYNTH_API char* fluid_version_str(void);

View file

@ -0,0 +1,106 @@
#[=======================================================================[.rst:
FindFLAC
-------
Finds the FLAC library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``FLAC::FLAC``
The FLAC C library.
``FLAC::FLAC++``
The FLAC C++ library.
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``FLAC_FOUND``
True if both libraries were found.
``FLAC_FLAC_FOUND``
True if the C library was found.
``FLAC_FLAC++_FOUND``
True if the C++ library was found..
#]=======================================================================]
# Use pkg-config if available
find_package(PkgConfig QUIET)
pkg_check_modules(PC_FLAC QUIET flac)
pkg_check_modules(PC_FLAC++ QUIET flac++)
# Find the headers and libraries
find_path(
FLAC_INCLUDE_DIR
NAMES "FLAC/all.h"
HINTS "PC_FLAC_INCLUDEDIR")
find_path(
FLAC++_INCLUDE_DIR
NAMES "FLAC++/all.h"
HINTS "PC_FLAC++_INCLUDEDIR")
find_library(
FLAC_LIBRARY
NAMES "FLAC"
HINTS "${PC_FLAC_LIBDIR}")
find_library(
FLAC++_LIBRARY
NAMES "FLAC++"
HINTS "${PC_FLAC++_LIBDIR}")
# Handle transitive dependencies
if(PC_FLAC_FOUND)
get_target_properties_from_pkg_config("${FLAC_LIBRARY}" "PC_FLAC" "_flac")
else()
if(NOT TARGET "Ogg::ogg")
find_package(Ogg QUIET)
endif()
set(_flac_link_libraries "Ogg::ogg" ${MATH_LIBRARY})
endif()
if(PC_FLAC++_FOUND)
get_target_properties_from_pkg_config("${FLAC++_LIBRARY}" "PC_FLAC++"
"_flac++")
else()
set(_flac++_link_libraries "FLAC::FLAC")
endif()
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
FLAC REQUIRED_VARS "FLAC_LIBRARY" "FLAC_INCLUDE_DIR" "FLAC++_LIBRARY"
"FLAC++_INCLUDE_DIR")
# Create the target
if(FLAC_FOUND AND NOT TARGET FLAC::FLAC)
add_library(FLAC::FLAC UNKNOWN IMPORTED)
set_target_properties(
FLAC::FLAC
PROPERTIES IMPORTED_LOCATION "${FLAC_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_flac_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${FLAC_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${_flac_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_flac_link_directories}")
set(FLAC_FLAC_FOUND TRUE)
endif()
if(FLAC_FOUND AND NOT TARGET FLAC::FLAC++)
add_library(FLAC::FLAC++ UNKNOWN IMPORTED)
set_target_properties(
FLAC::FLAC++
PROPERTIES IMPORTED_LOCATION "${FLAC++_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_flac++_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${FLAC++_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${_flac++_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_flac++_link_directories}")
set(FLAC_FLAC++_FOUND TRUE)
endif()
mark_as_advanced(FLAC_LIBRARY FLAC_INCLUDE_DIR FLAC++_LIBRARY
FLAC++_INCLUDE_DIR)

View file

@ -0,0 +1,229 @@
#[=======================================================================[.rst:
FindGLib2
-------
Finds the GLib2 library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``GLib2::glib-2``
The GLib core library
``Glib2::gthread-2``
The GLib threading library
``Glib2::gmodule-2``
The GLib dynamic loader library
``Glib2::gobject-2``
The GLib class type system library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``GLib2_FOUND``
True if glib-2 and gthread-2 have been found.
``GLib2_VERSION``
The version of the GLib2 library which was found.
#]=======================================================================]
# Use pkg-config if available
find_package(PkgConfig QUIET)
pkg_check_modules(PC_GLIB2 QUIET glib-2.0)
pkg_check_modules(PC_GTHREAD2 QUIET gthread-2.0)
pkg_check_modules(PC_GMODULE2 QUIET gmodule-2.0)
pkg_check_modules(PC_GMODULE2 QUIET gobject-2.0)
# Find the headers and libraries
find_path(
GLib2_INCLUDE_DIR
NAMES "glib.h"
HINTS "${PC_GLIB2_INCLUDEDIR}"
PATH_SUFFIXES "glib-2.0")
find_library(
GLib2_glib-2_LIBRARY
NAMES "glib-2.0"
HINTS "${PC_GLIB2_LIBDIR}")
find_library(
GLib2_gthread-2_LIBRARY
NAMES "gthread-2.0"
HINTS "${PC_GTHREAD2_LIBDIR}")
find_library(
GLib2_gmodule-2_LIBRARY
NAMES "gmodule-2.0"
HINTS "${PC_GMODULE2_LIBDIR}")
find_library(
GLib2_gobject-2_LIBRARY
NAMES "gobject-2.0"
HINTS "${PC_GOBJECT2_LIBDIR}")
# GLib stores its config in lib/glib-2.0/include
get_filename_component(_glib2_libdir "${GLib2_glib-2_LIBRARY}" PATH)
find_path(
_glib2_config_header "glibconfig.h"
PATH_SUFFIXES "glib-2.0/include"
HINTS "${PC_GLIB2_INCLUDEDIR}" "${_glib2_libdir}")
set(GLib2_INCLUDE_DIRS "${GLib2_INCLUDE_DIR}" "${_glib2_config_header}")
# Get version from pkg-config or read the config header
if(PC_GLIB2_VERSION)
set(GLib2_VERSION "${PC_GLIB2_VERSION}")
elseif(_glib2_config_header)
file(READ "${_glib2_config_header}/glibconfig.h" _glib2_config_h)
string(REGEX MATCH "#define[ \t]+GLIB_MAJOR_VERSION[ \t]+([0-9]+)"
_glib2_major_re "${_glib2_config_h}")
set(_glib2_major "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define[ \t]+GLIB_MINOR_VERSION[ \t]+([0-9]+)"
_glib2_minor_re "${_glib2_config_h}")
set(_glib2_minor "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define[ \t]+GLIB_MICRO_VERSION[ \t]+([0-9]+)"
_glib2_patch_re "${_glib2_config_h}")
set(_glib2_patch "${CMAKE_MATCH_1}")
if(_glib2_major_re
AND _glib2_minor_re
AND _glib2_patch_re)
set(GLib2_VERSION "${_glib2_major}.${_glib2_minor}.${_glib2_patch}")
endif()
endif()
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
GLib2
REQUIRED_VARS "GLib2_glib-2_LIBRARY" "GLib2_gthread-2_LIBRARY"
"GLib2_INCLUDE_DIRS"
VERSION_VAR "GLib2_VERSION")
# Create the targets
if(GLib2_glib-2_LIBRARY AND NOT TARGET GLib2::glib-2)
# Handle transitive dependencies
if(PC_GLIB2_FOUND)
get_target_properties_from_pkg_config("${GLib2_glib-2_LIBRARY}" "PC_GLIB2"
"_glib2")
else()
find_package(Intl QUIET)
find_package(Iconv QUIET)
list(APPEND _glib2_link_libraries "Intl::Intl" "Iconv::Iconv")
if(WIN32)
list(APPEND _glib2_link_libraries "ws2_32" "winmm")
else()
list(APPEND _glib2_link_libraries "Threads::Threads")
endif()
list(APPEND _glib2_link_libraries ${MATH_LIBRARY})
# Glib can link to either PCRE 1 or 2
find_library(
_pcre2_8bit_library
NAMES "pcre2-8"
HINTS "${PC_GLIB2_LIBDIR}")
if(_pcre2_8bit_library)
include(CheckCSourceCompiles)
set(_backup_includes ${CMAKE_REQUIRED_INCLUDES})
set(_backup_libraries ${CMAKE_REQUIRED_LIBRARIES})
set(_backup_libdir ${CMAKE_REQUIRED_LIBRARIES})
set(CMAKE_REQUIRED_INCLUDES "${GLib2_INCLUDE_DIRS}")
set(CMAKE_REQUIRED_LIBRARIES
"${GLib2_glib-2_LIBRARY}" "${_glib2_link_libraries}"
"${_pcre2_8bit_library}")
check_c_source_compiles(
"#include <glib.h>
int main(){
g_regex_error_quark();
}"
GLIB2_USES_PCRE2)
set(CMAKE_REQUIRED_INCLUDES ${_backup_includes})
set(CMAKE_REQUIRED_LIBRARIES ${_backup_libraries})
endif()
if(GLIB2_USES_PCRE2)
list(APPEND _glib2_link_libraries "${_pcre2_8bit_library}")
else()
list(APPEND _glib2_link_libraries "pcre")
endif()
endif()
# pkg_check_modules consider these as LDFLAGS_OTHER rather instead of
# libraries
if(APPLE)
list(APPEND _glib2_link_libraries "-Wl,-framework,Foundation"
"-Wl,-framework,CoreFoundation" "-Wl,-framework,AppKit"
"-Wl,-framework,Carbon")
endif()
add_library(GLib2::glib-2 UNKNOWN IMPORTED)
set_target_properties(
GLib2::glib-2
PROPERTIES IMPORTED_LOCATION "${GLib2_glib-2_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_glib2_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${GLib2_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${_glib2_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_glib2_link_directories}")
endif()
if(GLib2_gthread-2_LIBRARY AND NOT TARGET GLib2::gthread-2)
# Handle transitive dependencies
if(PC_GTHREAD2_FOUND)
get_target_properties_from_pkg_config("${GLib2_gthread-2_LIBRARY}"
"PC_GTHREAD2" "_gthread2")
else()
set(_gthread2_link_libraries "Threads::Threads" "GLib2::glib-2")
endif()
add_library(GLib2::gthread-2 UNKNOWN IMPORTED)
set_target_properties(
GLib2::gthread-2
PROPERTIES IMPORTED_LOCATION "${GLib2_gthread-2_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_gthread2_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${GLib2_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${_gthread2_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_gthread2_link_directories}")
endif()
if(GLib2_gmodule-2_LIBRARY AND NOT TARGET GLib2::gmodule-2)
# Handle transitive dependencies
if(PC_GMODULE2_FOUND)
get_target_properties_from_pkg_config("${GLib2_gmodule-2_LIBRARY}"
"PC_GMODULE2" "_gmodule2")
else()
set(_gmodule2_link_libraries "GLib2::glib-2")
endif()
add_library(GLib2::gmodule-2 UNKNOWN IMPORTED)
set_target_properties(
GLib2::gmodule-2
PROPERTIES IMPORTED_LOCATION "${GLib2_gmodule-2_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_gmodule2_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${GLib2_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${_gmodule2_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_gmodule2_link_directories}")
endif()
if(GLib2_gobject-2_LIBRARY AND NOT TARGET GLib2::gobject-2)
# Handle transitive dependencies
if(PC_GOBJECT2_FOUND)
get_target_properties_from_pkg_config("${GLib2_gobject-2_LIBRARY}"
"PC_OBJECT2" "_gobject2")
else()
find_package(libffi QUIET)
set(_gobject2_link_libraries "libffi" "GLib2::glib-2")
endif()
add_library(GLib2::gobject-2 UNKNOWN IMPORTED)
set_target_properties(
GLib2::gobject-2
PROPERTIES IMPORTED_LOCATION "${GLib2_gobject-2_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_gobject2_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${GLib2_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${_gobject2_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_gobject2_link_directories}")
endif()
mark_as_advanced(GLib2_INCLUDE_DIR GLib2_glib-2_LIBRARY GLib2_gthread-2_LIBRARY
GLib2_gmodule-2_LIBRARY GLib2_gobject-2_LIBRARY)

View file

@ -0,0 +1,89 @@
#[=======================================================================[.rst:
FindInstPatch
-------
Finds the InstPatch library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``InstPatch::libinstpatch``
The InstPatch library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``InstPatch_FOUND``
True if the system has the InstPatch library.
``InstPatch_VERSION``
The version of the InstPatch library which was found.
#]=======================================================================]
# Use pkg-config if available
find_package(PkgConfig QUIET)
pkg_check_modules(PC_INSTPATCH QUIET libinstpatch-1.0)
# Find the headers and library
find_path(
InstPatch_INCLUDE_DIR
NAMES "libinstpatch/libinstpatch.h"
HINTS "${PC_INSTPATCH_INCLUDEDIR}"
PATH_SUFFIXES "libinstpatch-1" "libinstpatch-2")
find_library(
InstPatch_LIBRARY
NAMES "instpatch-1.0"
HINTS "${PC_INSTPATCH_LIBDIR}")
# Get version from pkg-config or read the config header
if(PC_INSTPATCH_VERSION)
set(InstPatch_VERSION "${PC_INSTPATCH_VERSION}")
elseif(InstPatch_INCLUDE_DIR)
file(READ "${InstPatch_INCLUDE_DIR}/libinstpatch/version.h" _version_h)
string(REGEX MATCH
"#define[ \t]+IPATCH_VERSION[ \t]+\"([0-9]+.[0-9]+.[0-9]+)\""
_instpatch_version_re "${_version_h}")
set(InstPatch_VERSION "${CMAKE_MATCH_1}")
endif()
# Handle transitive dependencies
if(PC_INSTPATCH_FOUND)
get_target_properties_from_pkg_config("${InstPatch_LIBRARY}" "PC_INSTPATCH"
"_instpatch")
else()
if(NOT TARGET GLib2::gobject-2
OR NOT TARGET GLib2::gthread-2
OR NOT TARGET GLib2::glib-2)
find_package(GLib2 QUIET)
endif()
if(NOT TARGET SndFile::sndfile)
find_package(SndFile QUIET)
endif()
set(_instpatch_link_libraries "GLib2::gobject-2" "GLib2::gthread-2"
"GLib2::glib-2" "SndFile::sndfile")
endif()
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
InstPatch
REQUIRED_VARS "InstPatch_LIBRARY" "InstPatch_INCLUDE_DIR"
VERSION_VAR "InstPatch_VERSION")
if(InstPatch_FOUND AND NOT TARGET InstPatch::libinstpatch)
add_library(InstPatch::libinstpatch UNKNOWN IMPORTED)
set_target_properties(
InstPatch::libinstpatch
PROPERTIES IMPORTED_LOCATION "${InstPatch_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_instpatch_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${InstPatch_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${_instpatch_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_instpatch_link_directories}")
endif()
mark_as_advanced(InstPatch_INCLUDE_DIR InstPatch_LIBRARY)

View file

@ -0,0 +1,64 @@
#[=======================================================================[.rst:
FindJack
-------
Finds the Jack library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``Jack::libJack``
The Jack library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``Jack_FOUND``
True if the system has the Jack library.
#]=======================================================================]
# Use pkg-config if available
find_package(PkgConfig QUIET)
pkg_check_modules(PC_JACK QUIET jack)
# Find the headers and library
find_path(
Jack_INCLUDE_DIR
NAMES "jack/jack.h"
HINTS "${PC_JACK_INCLUDEDIR}")
find_library(
Jack_LIBRARY
NAMES "jack"
HINTS "${PC_JACK_LIBDIR}")
# Handle transitive dependencies
if(PC_JACK_FOUND)
get_target_properties_from_pkg_config("${Jack_LIBRARY}" "PC_JACK" "_jack")
else()
set(_jack_link_libraries "Threads::Threads")
endif()
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Jack REQUIRED_VARS "Jack_LIBRARY"
"Jack_INCLUDE_DIR")
# Create the target
if(Jack_FOUND AND NOT TARGET Jack::Jack)
add_library(Jack::Jack UNKNOWN IMPORTED)
set_target_properties(
Jack::Jack
PROPERTIES IMPORTED_LOCATION "${Jack_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_jack_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${Jack_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${_jack_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_jack_link_directories}")
endif()
mark_as_advanced(Jack_INCLUDE_DIR Jack_LIBRARY)

View file

@ -0,0 +1,84 @@
#[=======================================================================[.rst:
FindLASH
-------
Finds the LASH library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``LASH::LASH``
The LASH library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``LASH_FOUND``
True if the system has the LASH library.
``LASH_VERSION``
The version of the LASH library which was found.
#]=======================================================================]
# Use pkg-config if available
find_package(PkgConfig QUIET)
pkg_check_modules(PC_LASH QUIET lash-1.0)
# Find the headers and library
find_path(
LASH_INCLUDE_DIR
NAMES "lash/lash.h"
HINTS "${PC_LASH_INCLUDEDIR}"
PATH_SUFFIXES "lash-1.0")
find_library(
LASH_LIBRARY
NAMES "lash"
HINTS "${PC_LASH_LIBDIR}")
# Get version from pkg-config or read the config header
if(PC_LASH_VERSION)
set(LASH_VERSION "${PC_LASH_VERSION}")
else()
if(NOT LASH_FIND_VERSION)
set(_assumed_version "0.5.0")
else()
set(_assumed_version "${LASH_FIND_VERSION}")
endif()
message(
NOTICE
"LASH does not expose its version outside of pkg-config. Assuming version ${_assumed_version}, expect failure if your version is lower."
)
set(LASH_VERSION ${_assumed_version})
endif()
# Handle transitive dependencies
if(PC_LASH_FOUND)
get_target_properties_from_pkg_config("${LASH_LIBRARY}" "PC_LASH" "_lash")
else()
set(_lash_link_libraries "Jack::Jack" "Threads::Threads" "ALSA::ALSA" "uuid")
endif()
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
LASH
REQUIRED_VARS "LASH_LIBRARY" "LASH_INCLUDE_DIR"
VERSION_VAR "LASH_VERSION")
if(LASH_FOUND AND NOT TARGET LASH::LASH)
add_library(LASH::LASH UNKNOWN IMPORTED)
set_target_properties(
LASH::LASH
PROPERTIES IMPORTED_LOCATION "${LASH_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_lash_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${LASH_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${_lash_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_lash_link_directories}")
endif()
mark_as_advanced(LASH_INCLUDE_DIR LASH_LIBRARY)

View file

@ -0,0 +1,45 @@
#[=======================================================================[.rst:
FindMidiShare
-------
Finds the MidiShare library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``MidiShare::MidiShare``
The MidiShare library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``MidiShare_FOUND``
True if the system has the MidiShare library.
``MidiShare_VERSION``
The version of the MidiShare library which was found.
#]=======================================================================]
# Find headers and library
find_path(MidiShare_INCLUDE_DIR NAMES "MidiShare.h")
find_library(MidiShare_LIBRARY NAMES "MidiShare")
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
MidiShare REQUIRED_VARS "MidiShare_LIBRARY" "MidiShare_INCLUDE_DIR")
# Create the target
if(MidiShare_FOUND AND NOT TARGET MidiShare::MidiShare)
add_library(MidiShare::MidiShare UNKNOWN IMPORTED)
set_target_properties(
MidiShare::MidiShare
PROPERTIES IMPORTED_LOCATION "${MidiShare_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${MidiShare_INCLUDE_DIR}")
endif()
mark_as_advanced(MidiShare_INCLUDE_DIR MidiShare_LIBRARY)

View file

@ -0,0 +1,84 @@
#[=======================================================================[.rst:
FindOgg
-------
Finds the Ogg library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``Ogg::ogg``
The Ogg library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``Ogg_FOUND``
True if the system has the Ogg library.
For compatibility with upstream, the following variables are also set:
``Ogg_INCLUDE_DIR``
``Ogg_INCLUDE_DIRS``
``Ogg_LIBRARY``
``Ogg_LIBRARIES``
``OGG_INCLUDE_DIR``
``OGG_INCLUDE_DIRS``
``OGG_LIBRARY``
``OGG_LIBRARIES``
``OGG_FOUND``
#]=======================================================================]
# Use pkg-config if available
find_package(PkgConfig QUIET)
pkg_check_modules(PC_OGG QUIET ogg)
# Find the headers and library
find_path(
Ogg_INCLUDE_DIR
NAMES "ogg/ogg.h"
HINTS "${PC_OGG_INCLUDEDIR}")
find_library(
_ogg_library
NAMES "ogg"
HINTS "${PC_OGG_LIBDIR}")
# Extract additional flags if pkg-config is available
if(PC_OGG_FOUND)
get_target_properties_from_pkg_config("${_ogg_library}" "PC_OGG" "_ogg")
endif()
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Ogg REQUIRED_VARS "_ogg_library"
"Ogg_INCLUDE_DIR")
# Create the target
if(Ogg_FOUND AND NOT TARGET Ogg::ogg)
add_library(Ogg::ogg UNKNOWN IMPORTED)
set_target_properties(
Ogg::ogg
PROPERTIES IMPORTED_LOCATION "${_ogg_library}"
INTERFACE_COMPILE_OPTIONS "${_ogg_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${Ogg_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${_ogg_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_ogg_link_directories}")
# Set additional variables for compatibility with upstream config
set(Ogg_INCLUDE_DIRS "${Ogg_INCLUDE_DIR}")
set(Ogg_LIBRARY Ogg::ogg)
set(Ogg_LIBRARIES Ogg::ogg)
set(OGG_INCLUDE_DIR "${${Ogg_INCLUDE_DIR}}")
set(OGG_INCLUDE_DIRS "${${Ogg_INCLUDE_DIR}}")
set(OGG_LIBRARY Ogg::ogg)
set(OGG_LIBRARIES Ogg::ogg)
set(OGG_FOUND TRUE)
endif()
mark_as_advanced(_ogg_library)

View file

@ -0,0 +1,44 @@
#[=======================================================================[.rst:
FindOpenSLES
-------
Finds the OpenSLES library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``OpenSLES::libOpenSLES``
The OpenSLES library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``OpenSLES_FOUND``
True if the system has the OpenSLES library.
#]=======================================================================]
# Find the headers and library
find_path(OpenSLES_INCLUDE_DIR NAMES "SLES/OpenSLES.h")
find_library(OpenSLES_LIBRARY NAMES "OpenSLES")
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OpenSLES REQUIRED_VARS "OpenSLES_LIBRARY"
"OpenSLES_INCLUDE_DIR")
# Create the target
if(OpenSLES_FOUND AND NOT TARGET OpenSLES::OpenSLES)
add_library(OpenSLES::OpenSLES UNKNOWN IMPORTED)
set_target_properties(
OpenSLES::OpenSLES
PROPERTIES IMPORTED_LOCATION "${OpenSLES_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${OpenSLES_INCLUDE_DIR}")
endif()
mark_as_advanced(OpenSLES_INCLUDE_DIR OpenSLES_LIBRARY)

View file

@ -0,0 +1,106 @@
#[=======================================================================[.rst:
FindOpus
-------
Finds the Opus library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``Opus::opus``
The Opus library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``Opus_FOUND``
True if the system has the Opus library.
``Opus_VERSION``
The version of the Opus library which was found.
For compatibility with upstream, the following variables are also set:
``OPUS_VERSION_STRING``
``OPUS_VERSION_MAJOR``
``OPUS_VERSION_MINOR``
``OPUS_VERSION_PATCH``
``OPUS_INCLUDE_DIR``
``OPUS_INCLUDE_DIRS``
``OPUS_LIBRARY``
``OPUS_LIBRARIES``
``OPUS_FOUND``
#]=======================================================================]
# Use pkg-config if available
find_package(PkgConfig QUIET)
pkg_check_modules(PC_OPUS QUIET opus)
# Find the headers and library
find_path(
Opus_INCLUDE_DIR
NAMES "opus/opus.h"
HINTS "${PC_OPUS_INCLUDEDIR}")
find_library(
Opus_LIBRARY
NAMES "opus"
HINTS "${PC_OPUS_LIBDIR}")
# Get the version from pkg-config
if(PC_OPUS_VERSION)
set(Opus_VERSION "${PC_OPUS_VERSION}")
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)
else()
message(STATUS "Unable to get Opus version without pkg-config.")
set(Opus_VERSION)
set(OPUS_VERSION)
set(OPUS_VERSION_STRING)
set(OPUS_VERSION_MAJOR)
set(OPUS_VERSION_MINOR)
set(OPUS_VERSION_PATCH)
endif()
# Extract additional flags if pkg-config is available
if(PC_OPUS_FOUND)
get_target_properties_from_pkg_config("${Opus_LIBRARY}" "PC_OPUS" "_opus")
endif()
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
Opus
REQUIRED_VARS "Opus_LIBRARY" "Opus_INCLUDE_DIR"
VERSION_VAR "Opus_VERSION")
# Create the target
if(Opus_FOUND AND NOT TARGET Opus::opus)
set(_opus_include_dirs "${Opus_INCLUDE_DIR}" "${Opus_INCLUDE_DIR}/opus")
add_library(Opus::opus UNKNOWN IMPORTED)
set_target_properties(
Opus::opus
PROPERTIES IMPORTED_LOCATION "${Opus_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_opus_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${_opus_include_dirs}"
INTERFACE_LINK_LIBRARIES "${_opus_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_opus_link_directories}")
# Set additional variables for compatibility with upstream config
set(OPUS_FOUND TRUE)
set(OPUS_LIBRARY Opus::opus)
set(OPUS_LIBRARIES Opus::opus)
set(OPUS_INCLUDE_DIR "${_opus_include_dirs}")
set(OPUS_INCLUDE_DIRS "${_opus_include_dirs}")
endif()
mark_as_advanced(Opus_LIBRARY Opus_INCLUDE_DIR)

View file

@ -0,0 +1,97 @@
#[=======================================================================[.rst:
FindPipeWire
-------
Finds the PipeWire library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``PipeWire::PipeWire``
The PipeWire library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``PipeWire_FOUND``
True if the system has the PipeWire library.
``PipeWire_VERSION``
The version of the PipeWire library which was found.
#]=======================================================================]
# Use pkg-config if available
find_package(PkgConfig QUIET)
pkg_check_modules(PC_PIPEWIRE QUIET libpipewire-0.3)
# Find the headers and library
find_path(
PipeWire_INCLUDE_DIR
NAMES "pipewire/pipewire.h"
HINTS "${PC_PIPEWIRE_INCLUDEDIR}"
PATH_SUFFIXES "pipewire-0.3")
find_path(
Spa_INCLUDE_DIR
NAMES "spa/support/plugin.h"
HINTS "${PC_PIPEWIRE_INCLUDEDIR}"
PATH_SUFFIXES "spa-0.2")
find_library(
PipeWire_LIBRARY
NAMES "pipewire-0.3"
HINTS "${PC_PIPEWIRE_LIBDIR}")
# Get version from pkg-config or read the version header
if(PC_PIPEWIRE_VERSION)
set(PipeWire_VERSION "${PC_PIPEWIRE_VERSION}")
elseif(PipeWire_INCLUDE_DIR)
file(READ "${PipeWire_INCLUDE_DIR}/pipewire/version.h" _version_h)
string(REGEX MATCH "#define[ \t]+PW_MAJOR[ \t]+([0-9]+)" _pipewire_major_re
"${_version_h}")
set(_pipewire_major "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define[ \t]+PW_MINOR[ \t]+([0-9]+)" _pipewire_minor_re
"${_version_h}")
set(_pipewire_minor "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define[ \t]+PW_MICRO[ \t]+([0-9]+)" _pipewire_patch_re
"${_version_h}")
set(_pipewire_patch "${CMAKE_MATCH_1}")
if(_pipewire_major_re
AND _pipewire_minor_re
AND _pipewire_patch_re)
set(pipewire_VERSION
"${_pipewire_major}.${_pipewire_minor}.${_pipewire_patch}")
endif()
endif()
# Extract additional flags if pkg-config is available
if(PC_PIPEWIRE_FOUND)
get_target_properties_from_pkg_config("${PipeWire_LIBRARY}" "PC_PIPEWIRE"
"_pipewire")
endif()
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
PipeWire
REQUIRED_VARS "PipeWire_LIBRARY" "PipeWire_INCLUDE_DIR" "Spa_INCLUDE_DIR"
VERSION_VAR "PipeWire_VERSION")
# Create the target
if(PipeWire_FOUND AND NOT TARGET PipeWire::PipeWire)
add_library(PipeWire::PipeWire UNKNOWN IMPORTED)
set_target_properties(
PipeWire::PipeWire
PROPERTIES IMPORTED_LOCATION "${PipeWire_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_pipewire_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES
"${PipeWire_INCLUDE_DIR};${Spa_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${_pipewire_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_pipewire_link_directories}")
endif()
mark_as_advanced(PipeWire_INCLUDE_DIR Spa_INCLUDE_DIR PipeWire_LIBRARY)

View file

@ -0,0 +1,66 @@
#[=======================================================================[.rst:
FindPortAudio
-------
Finds the PortAudio library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``PortAudio::PortAudio``
The PortAudio library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``PortAudio_FOUND``
True if the system has the PortAudio library.
``PortAudio_VERSION``
The version of the PortAudio library which was found.
#]=======================================================================]
# Use pkg-config if available
find_package(PkgConfig QUIET)
pkg_check_modules(PC_PORTAUDIO QUIET portaudio-2.0)
# Find the headers and library
find_path(
PortAudio_INCLUDE_DIR
NAMES "portaudio.h"
HINTS "${PC_PORTAUDIO_INCLUDEDIR}")
find_library(
PortAudio_LIBRARY
NAMES "portaudio"
HINTS "${PC_PORTAUDIO_LIBDIR}")
# Handle transitive dependencies
if(PC_PORTAUDIO_FOUND)
get_target_properties_from_pkg_config("${PortAudio_LIBRARY}" "PC_PORTAUDIO"
"_portaudio")
else()
set(_portaudio_link_libraries "ALSA::ALSA" ${MATH_LIBRARY} "Threads::Threads")
endif()
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
PortAudio REQUIRED_VARS "PortAudio_LIBRARY" "PortAudio_INCLUDE_DIR")
if(PortAudio_FOUND AND NOT TARGET PortAudio::PortAudio)
add_library(PortAudio::PortAudio UNKNOWN IMPORTED)
set_target_properties(
PortAudio::PortAudio
PROPERTIES IMPORTED_LOCATION "${PortAudio_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_portaudio_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${PortAudio_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${_portaudio_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_portaudio_link_directories}")
endif()
mark_as_advanced(PortAudio_INCLUDE_DIR PortAudio_LIBRARY)

View file

@ -0,0 +1,85 @@
#[=======================================================================[.rst:
FindReadline
-------
Finds the Readline library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``Readline::Readline``
The Readline library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``Readline_FOUND``
True if the system has the Readline library.
``Readline_VERSION``
The version of the Readline library which was found.
#]=======================================================================]
# Use pkg-config if available
find_package(PkgConfig QUIET)
pkg_check_modules(PC_READLINE QUIET readline)
# Search for the headers and library
find_path(
Readline_INCLUDE_DIR
NAMES "history.h"
HINTS "${PC_READLINE_INCLUDEDIR}"
PATH_SUFFIXES "readline")
find_library(
Readline_LIBRARY
NAMES "readline"
HINTS "${PC_READLINE_LIBDIR}")
# Get version from pkg-config or read the config header
if(PC_READLINE_VERSION)
set(Readline_VERSION "${PC_READLINE_VERSION}")
elseif(Readline_INCLUDE_DIR)
file(READ "${Readline_INCLUDE_DIR}/readline.h" _readline_h)
string(REGEX MATCH "#define[ \t]+RL_VERSION_MAJOR[ \t]+([0-9]+)"
_readline_major_re "${_readline_h}")
set(_readline_major "${CMAKE_MATCH_1}")
string(REGEX MATCH "#define[ \t]+RL_VERSION_MINOR[ \t]+([0-9]+)"
_readline_minor_re "${_readline_h}")
set(_readline_minor "${CMAKE_MATCH_1}")
if(_readline_major_re AND _readline_minor_re)
set(readline_VERSION "${_readline_major}.${_readline_minor}")
endif()
endif()
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
Readline
REQUIRED_VARS "Readline_LIBRARY" "Readline_INCLUDE_DIR"
VERSION_VAR "Readline_VERSION")
# Handle transitive dependencies
if(PC_READLINE_FOUND)
get_target_properties_from_pkg_config("${ReadLine_LIBRARY}" "PC_READLINE"
"_readline")
endif()
# Create the target
if(Readline_FOUND AND NOT TARGET Readline::Readline)
add_library(Readline::Readline UNKNOWN IMPORTED)
set_target_properties(
Readline::Readline
PROPERTIES IMPORTED_LOCATION "${Readline_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_readline_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES
"${Readline_INCLUDE_DIR};${Readline_INCLUDE_DIR}/.."
INTERFACE_LINK_LIBRARIES "${_readline_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_readline_link_directories}")
endif()
mark_as_advanced(Readline_INCLUDE_DIR Readline_LIBRARY)

View file

@ -0,0 +1,180 @@
#[=======================================================================[.rst:
FindSndFile
-------
Finds the SndFile library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``SndFile::sndfile``
The SndFile library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``SndFile_FOUND``
True if the system has the SndFile library.
``SndFile_VERSION``
The version of the SndFile library which was found.
``SndFile_WITH_EXTERNAL_LIBS``
True if the library was built with Xiph codecs.
For compatibility with upstream, the following variables are also set:
``SndFile_WITH_MPEG``
``SndFile_VERSION_MAJOR``
``SndFile_VERSION_MINOR``
``SndFile_VERSION_PATCH``
``SndFile_LIBRARY``
``SndFile_LIBRARIES``
``SNDFILE_LIBRARY``
``SNDFILE_LIBRARIES``
``SNDFILE_INCLUDE_DIR``
#]=======================================================================]
# Use pkg-config if available
find_package(PkgConfig QUIET)
pkg_check_modules(PC_SNDFILE QUIET sndfile)
# Find the headers and libraries
find_path(
SndFile_INCLUDE_DIR
NAMES "sndfile.h"
HINTS "${PC_SNDFILE_INCLUDEDIR}")
find_library(
_sndfile_library
NAMES "sndfile"
HINTS "${PC_SNDFILE_LIBDIR}")
# Get version from pkg-config or read the config header
if(PC_SNDFILE_VERSION)
set(SndFile_VERSION "${PC_SNDFILE_VERSION}")
string(REPLACE "." ";" _sndfile_version_list "${SndFile_VERSION}")
list(GET _sndfile_version_list 0 SndFile_VERSION_MAJOR)
list(GET _sndfile_version_list 1 SndFile_VERSION_MINOR)
list(GET _sndfile_version_list 2 SndFile_VERSION_PATCH)
elseif(SndFile_INCLUDE_DIR)
file(READ "${SndFile_INCLUDE_DIR}/sndfile.h" _sndfile_h)
if("#define SNDFILE_1" MATCHES _snfile_h)
set(SndFile_VERSION "1")
set(SndFile_VERSION_MAJOR "1")
endif()
endif()
# Check the features SndFile was built with
if(PC_SNDFILE_FOUND)
if("vorbis" IN_LIST PC_SNDFILE_STATIC_LIBRARIES)
set(SndFile_WITH_EXTERNAL_LIBS TRUE)
endif()
if("mpg123" IN_LIST PC_SNDFILE_STATIC_LIBRARIES)
set(SndFile_WITH_MPEG TRUE)
endif()
elseif(_sndfile_library)
# sndfile may need any of these libraries
find_package(Ogg 1.3 QUIET)
find_package(Vorbis QUIET)
find_package(FLAC QUIET)
find_package(Opus QUIET)
find_package(mp3lame QUIET)
find_package(mpg123 QUIET)
if(NOT CMAKE_CROSSCOMPILING)
include(CheckSourceRuns)
set(_backup_includes ${CMAKE_REQUIRED_INCLUDES})
set(_backup_libraries ${CMAKE_REQUIRED_LIBRARIES})
set(CMAKE_REQUIRED_INCLUDES "${SndFile_INCLUDE_DIR}")
set(CMAKE_REQUIRED_LIBRARIES "${_sndfile_library}")
set(_optional_libs "MPG123::libmpg123" "mp3lame::mp3lame" "FLAC::FLAC"
"Opus::opus" "Vorbis::vorbisenc" "Ogg::ogg")
foreach(_target ${_optional_libs})
if(TARGET "${_target}")
list(APPEND CMAKE_REQUIRED_LIBRARIES "${_target}")
endif()
endforeach()
check_source_runs(
C
"#include <stdlib.h>
#include <sndfile.h>
int main() {
SF_FORMAT_INFO info = {SF_FORMAT_VORBIS};
sf_command(NULL, SFC_GET_FORMAT_INFO, &info, sizeof info);
return info.name != NULL ? EXIT_SUCCESS : EXIT_FAILURE;
}"
SNDFILE_SUPPORTS_VORBIS)
check_source_runs(
C
"#include <stdlib.h>
#include <sndfile.h>
int main() {
SF_FORMAT_INFO info = {SF_FORMAT_MPEG_LAYER_III};
sf_command(NULL, SFC_GET_FORMAT_INFO, &info, sizeof info);
return info.name != NULL ? EXIT_SUCCESS : EXIT_FAILURE;
}"
SNDFILE_SUPPORTS_MPEG)
set(SndFile_WITH_EXTERNAL_LIBS ${SNDFILE_SUPPORTS_VORBIS})
set(SndFile_WITH_MPEG ${SNDFILE_SUPPORTS_MPEG})
set(CMAKE_REQUIRED_INCLUDES ${_backup_includes})
set(CMAKE_REQUIRED_LIBRARIES ${_backup_libraries})
else()
message(
STATUS
"Cross-compiling without pkg-config - cannot check for external libraries."
"If you have the upstream CMake config set CMAKE_FIND_PACKAGE_PREFER_CONFIG to true for accurate results."
)
set(SndFile_WITH_EXTERNAL_LIBS FALSE)
set(SndFile_WITH_MPEG FALSE)
endif()
endif()
# Handle transitive dependencies
if(PC_SNDFILE_FOUND)
get_target_properties_from_pkg_config("${_sndfile_library}" "PC_SNDFILE"
"_sndfile")
else()
if(SndFile_WITH_EXTERNAL_LIBS)
list(APPEND _sndfile_link_libraries "FLAC::FLAC" "Opus::opus"
"Vorbis::vorbisenc" "Ogg::ogg")
endif()
if(SndFile_WITH_MPEG)
list(APPEND _sndfile_link_libraries "MPG123::libmpg123" "mp3lame::mp3lame")
endif()
endif()
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
SndFile
REQUIRED_VARS "_sndfile_library" "SndFile_INCLUDE_DIR"
VERSION_VAR "SndFile_VERSION")
if(SndFile_FOUND AND NOT TARGET SndFile::sndfile)
add_library(SndFile::sndfile UNKNOWN IMPORTED)
set_target_properties(
SndFile::sndfile
PROPERTIES IMPORTED_LOCATION "${_sndfile_library}"
INTERFACE_COMPILE_OPTIONS "${_sndfile_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${SndFile_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${_sndfile_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_sndfile_link_directories}")
# Set additional variables for compatibility with upstream config
set(SNDFILE_FOUND TRUE)
set(SndFile_LIBRARY SndFile::sndfile)
set(SndFile_LIBRARIES SndFile::sndfile)
set(SNDFILE_LIBRARY SndFile::sndfile)
set(SNDFILE_LIBRARIES SndFile::sndfile)
set(SNDFILE_INCLUDE_DIR "${SndFile_INCLUDE_DIR}")
endif()
mark_as_advanced(_sndfile_library)

View file

@ -0,0 +1,62 @@
#[=======================================================================[.rst:
FindSystemd
-------
Finds the Systemd library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``Systemd::libsystemd``
The Systemd library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``Systemd_FOUND``
True if the system has the Systemd library.
#]=======================================================================]
# Use pkg-config if available
find_package(PkgConfig QUIET)
pkg_check_modules(PC_SYSTEMD QUIET libsystemd)
# Find the headers and library
find_path(
Systemd_INCLUDE_DIR
NAMES "systemd/sd-daemon.h"
HINTS "${PC_SYSTEMD_INCLUDEDIR}")
find_library(
Systemd_LIBRARY
NAMES "systemd"
HINTS "${PC_SYSTEMD_LIBDIR}")
# Extract additional flags if pkg-config is available
if(PC_SYSTEMD_FOUND)
get_target_properties_from_pkg_config("${Systemd_LIBRARY}" "PC_SYSTEMD"
"_systemd")
endif()
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Systemd REQUIRED_VARS "Systemd_LIBRARY"
"Systemd_INCLUDE_DIR")
if(Systemd_FOUND AND NOT TARGET Systemd::libsystemd)
add_library(Systemd::libsystemd UNKNOWN IMPORTED)
set_target_properties(
Systemd::libsystemd
PROPERTIES IMPORTED_LOCATION "${Systemd_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_systemd_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${Systemd_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${_systemd_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_systemd_link_directories}")
endif()
mark_as_advanced(Systemd_INCLUDE_DIR Systemd_LIBRARY)

View file

@ -0,0 +1,127 @@
#[=======================================================================[.rst:
FindVorbis
-------
Finds the Vorbis library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``Vorbis::vorbisc``
The Vorbis core library
``Vorbis::vorbisenc``
The Vorbis encoder library
``Vorbis::vorbisfile``
The Vorbis file library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``Vorbis_FOUND``
True if all vorbis libraries were found.
``Vorbis_Vorbis_FOUND``
True if the base vorbis library was found.
``Vorbis_Enc_FOUND``
True if the encoder library was found.
``Vorbis_File_FOUND``
True if the file library was found.
#]=======================================================================]
# Use pkg-config if available
find_package(PkgConfig QUIET)
pkg_check_modules(PC_VORBIS QUIET vorbis)
pkg_check_modules(PC_VORBISENC QUIET vorbisenc)
pkg_check_modules(PC_VORBISFILE QUIET vorbisfile)
# Find the headers and libraries
find_path(
Vorbis_INCLUDE_DIR
NAMES "vorbis/codec.h"
HINTS "${PC_VORBIS_INCLUDEDIR}")
find_library(
Vorbis_LIBRARY
NAMES "vorbis"
HINTS "${PC_VORBIS_LIBDIR}")
find_library(
Vorbis_Enc_LIBRARY
NAMES "vorbisenc"
HINTS "${PC_VORBISENC_LIBDIR}")
find_library(
Vorbis_File_LIBRARY
NAMES "vorbisfile"
HINTS "${PC_VORBISFILE_LIBDIR}")
# Handle transitive dependencies
if(PC_VORBIS_FOUND)
get_target_properties_from_pkg_config("${Vorbis_LIBRARY}" "PC_VORBIS"
"_vorbis")
else()
if(NOT TARGET Ogg::ogg)
find_package(Ogg QUIET)
endif()
set(_vorbis_link_libraries "Ogg::ogg" ${MATH_LIBRARY})
endif()
# Extract additional flags if pkg-config is available
if(PC_VORBISENC_FOUND)
get_target_properties_from_pkg_config("${Vorbis_Enc_LIBRARY}" "PC_VORBISENC"
"_vorbis_enc")
endif()
if(PC_VORBISFILE_FOUND)
get_target_properties_from_pkg_config("${Vorbis_File_LIBRARY}"
"PC_VORBISFILE" "_vorbis_file")
endif()
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
Vorbis REQUIRED_VARS "Vorbis_LIBRARY" "Vorbis_Enc_LIBRARY"
"Vorbis_File_LIBRARY" "Vorbis_INCLUDE_DIR")
# Create the targets
if(Vorbis_FOUND AND NOT TARGET Vorbis::vorbis)
add_library(Vorbis::vorbis UNKNOWN IMPORTED)
set_target_properties(
Vorbis::vorbis
PROPERTIES IMPORTED_LOCATION "${Vorbis_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_vorbis_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${Vorbis_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${_vorbis_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_vorbis_link_directories}")
set(Vorbis_Vorbis_FOUND TRUE)
endif()
if(Vorbis_FOUND AND NOT TARGET Vorbis::vorbisenc)
add_library(Vorbis::vorbisenc UNKNOWN IMPORTED)
set_target_properties(
Vorbis::vorbisenc
PROPERTIES IMPORTED_LOCATION "${Vorbis_Enc_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_vorbis_enc_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${Vorbis_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "Vorbis::vorbis"
INTERFACE_LINK_DIRECTORIES "${_vorbis_enc_link_directories}")
set(Vorbis_Enc_FOUND TRUE)
endif()
if(Vorbis_FOUND AND NOT TARGET Vorbis::vorbisfile)
add_library(Vorbis::vorbisfile UNKNOWN IMPORTED)
set_target_properties(
Vorbis::vorbisfile
PROPERTIES IMPORTED_LOCATION "${Vorbis_File_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_vorbis_file_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${Vorbis_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "Vorbis::vorbis"
INTERFACE_LINK_DIRECTORIES "${_vorbis_file_link_directories}")
set(Vorbis_File_FOUND TRUE)
endif()
mark_as_advanced(Vorbis_LIBRARY Vorbis_Enc_LIBRARY Vorbis_File_LIBRARY)

View file

@ -0,0 +1,61 @@
#[=======================================================================[.rst:
Findlibffi
-------
Finds the libffi library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``libffi``
The ffi library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``libffi_FOUND``
True if the system has the Ffi library.
#]=======================================================================]
# Use pkg-config if available
find_package(PkgConfig QUIET)
pkg_check_modules(PC_LIBFFI QUIET libffi)
# Find the headers and library
find_path(
libffi_INCLUDE_DIR
NAMES "ffi.h"
HINTS "${PC_LIBFFI_INCLUDE_DIR}")
find_library(
libffi_LIBRARY
NAMES "ffi" "libffi"
HINTS "${PC_FFI_LIBDIR}")
# Extract additional flags if pkg-config is available
if(PC_FFI_FOUND)
get_target_properties_from_pkg_config("${libffi_LIBRARY}" "PC_FFI" "_libffi")
endif()
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(libffi REQUIRED_VARS "libffi_LIBRARY"
"libffi_INCLUDE_DIR")
if(libffi_FOUND AND NOT TARGET libffi)
add_library(libffi UNKNOWN IMPORTED)
set_target_properties(
libffi
PROPERTIES IMPORTED_LOCATION "${libffi_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${_libffi_compile_options}"
INTERFACE_INCLUDE_DIRECTORIES "${libffi_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${_libffi_link_libraries}"
INTERFACE_LINK_DIRECTORIES "${_libffi_link_directories}")
endif()
mark_as_advanced(libffi_LIBRARY libffi_INCLUDE_DIR)

View file

@ -0,0 +1,63 @@
#[=======================================================================[.rst:
Findmp3lame
-------
Finds the mp3lame library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``mp3lame::mp3lame``
The mp3lame library.
``mp3lame::mpghip``
The mpghip library.
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``mp3lame_FOUND``
True if the mp3lame library was found.
``mp3lame_mpghip_FOUND``
True if the mpghip library was found.
#]=======================================================================]
# Find the headers and libraries
find_path(mp3lame_INCLUDE_DIR NAMES "lame/lame.h")
find_library(mp3lame_mp3lame_LIBRARY NAMES "mp3lame" "libmp3lame"
"libmp3lame-static")
find_library(mp3lame_mpghip_LIBRARY NAMES "mpghip" "libmpghip"
"libmpghip-static")
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
mp3lame REQUIRED_VARS "mp3lame_mp3lame_LIBRARY"
"mp3lame_INCLUDE_DIR")
# Create the targets
if(mp3lame_FOUND AND NOT TARGET mp3lame::mp3lame)
add_library(mp3lame::mp3lame UNKNOWN IMPORTED)
set_target_properties(
mp3lame::mp3lame
PROPERTIES IMPORTED_LOCATION "${mp3lame_mp3lame_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${mp3lame_INCLUDE_DIR}")
set(mp3lame_mp3lame_FOUND TRUE)
endif()
if(mp3lame_mpghip_LIBRARY AND NOT TARGET mp3lame::mpghip)
add_library(mp3lame::mpghip UNKNOWN IMPORTED)
set_target_properties(
mp3lame::mpghip
PROPERTIES IMPORTED_LOCATION "${mp3lame_mpghip_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${mp3lame_INCLUDE_DIR}")
set(mp3lame_mpghip_FOUND)
endif()
mark_as_advanced(mp3lame_INCLUDE_DIR mp3lame_mp3lame_LIBRARY
mp3lame_mpghip_LIBRARY)

View file

@ -0,0 +1,108 @@
#[=======================================================================[.rst:
Findmpg123
-------
Finds the mpg123 library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``MPG123::libmpg123``
The mpg123 decoder library
``MPG123::libout123``
The mpg123 output library
``MPG123::libsyn123``
The mpg123 signal synthesis library
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``mpg123_FOUND``
True if the package was found.
``mpg123_libmpg123_FOUND``
True if the decoder library was found.
``mpg123_libout123_FOUND``
True if the output library was found.
``mpg123_libsyn123_FOUND``
True if the signal synthesis library was found.
#]=======================================================================]
# Use pkg-config if available
find_package(PkgConfig QUIET)
pkg_check_modules(PC_MPG123 QUIET libmpg123)
pkg_check_modules(PC_OUT123 QUIET libout123)
pkg_check_modules(PC_SYN123 QUIET libsyn123)
# Find the headers and libraries
find_path(
mpg123_INCLUDE_DIR
NAMES "mpg123.h"
HINTS "${PC_MPG123_INCLUDEDIR}")
find_library(
mpg123_libmpg123_LIBRARY
NAMES "mpg123"
HINTS "${PC_MPG123_LIBDIR}")
find_library(
mpg123_libout123_LIBRARY
NAMES "out123"
HINTS "${PC_OUT123_LIBDIR}")
find_library(
mpg123_libsyn123_LIBRARY
NAMES "syn123"
HINTS "${PC_SYN123_LIBDIR}")
# Extract additional flags if pkg-config is available
if(PC_MPG123_FOUND)
get_target_properties_from_pkg_config("${mpg123_libmpg123_LIBRARY}"
"PC_MPG123" "_libmpg123")
endif()
if(PC_OUT123_FOUND)
get_target_properties_from_pkg_config("${mpg123_libout123_LIBRARY}"
"PC_OUT123" "_libout123")
endif()
if(PC_SYN123_FOUND)
get_target_properties_from_pkg_config("${mpg123_libsyn123_LIBRARY}"
"PC_SYN123" "_libsyn123")
endif()
# Mark which component were found
foreach(_component libmpg123 libout123 libsyn123)
if(mpg123_${_component}_LIBRARY)
set(mpg123_${_component}_FOUND TRUE)
else()
set(mpg123_${_component}_FOUND FALSE)
endif()
endforeach()
# Forward the result to CMake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
mpg123
REQUIRED_VARS "mpg123_libmpg123_LIBRARY" "mpg123_INCLUDE_DIR"
HANDLE_COMPONENTS)
# Create the targets
foreach(_component libmpg123 libout123 libsyn123)
if(mpg123_${_component}_FOUND AND NOT TARGET MPG123::${_component})
add_library(MPG123::${_component})
set_target_properties(
MPG123::${_component}
PROPERTIES IMPORTED_LOCATION "${mpg123_${_component}_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${mpg123_INCLUDE_DIR}"
INTERFACE_COMPILE_OPTIONS "${_${_component}_compile_options}"
INTERFACE_LINK_LIBRARIES "${_${_component}_link_libraries}"
INTERFACE_LINK_DIRECTORIES
"${_${_component}_link_directories}")
endif()
endforeach()
mark_as_advanced(mpg123_libmpg123_LIBRARY mpg123_libout123_LIBRARY
mpg123_libsyn123_LIBRARY mpg123_INCLUDE_DIR)

View file

@ -1,10 +1,148 @@
# for the find_dependency() macro: # Audio / MIDI driver support
# include(CMakeFindDependencyMacro) set(FLUIDSYNTH_SUPPORT_ALSA )
# it has the same syntax as find_package: set(FLUIDSYNTH_SUPPORT_COREAUDIO 1)
# find_dependency(MYDEP REQUIRED) set(FLUIDSYNTH_SUPPORT_COREMIDI 1)
set(FLUIDSYNTH_SUPPORT_DART )
set(FLUIDSYNTH_SUPPORT_DSOUND )
set(FLUIDSYNTH_SUPPORT_JACK FALSE)
set(FLUIDSYNTH_SUPPORT_MIDISHARE FALSE)
set(FLUIDSYNTH_SUPPORT_OBOE )
set(FLUIDSYNTH_SUPPORT_OPENSLES )
set(FLUIDSYNTH_SUPPORT_OSS FALSE)
set(FLUIDSYNTH_SUPPORT_PIPEWIRE FALSE)
set(FLUIDSYNTH_SUPPORT_PORTAUDIO )
set(FLUIDSYNTH_SUPPORT_PULSE )
set(FLUIDSYNTH_SUPPORT_SDL2 )
set(FLUIDSYNTH_SUPPORT_WASAPI )
set(FLUIDSYNTH_SUPPORT_WAVEOUT )
set(FLUIDSYNTH_SUPPORT_WINMIDI )
# define variables for configuration options: # Files support
# set(network-enabled ON) set(FLUIDSYNTH_SUPPORT_DLS TRUE)
set(FLUIDSYNTH_SUPPORT_LIBINSTPATCH TRUE)
set(FLUIDSYNTH_SUPPORT_LIBSNDFILE TRUE)
set(FLUIDSYNTH_SUPPORT_SF3 1)
# Miscrellaneous support
set(FLUIDSYNTH_SUPPORT_DBUS 0)
set(FLUIDSYNTH_SUPPORT_GETOPT 1)
set(FLUIDSYNTH_SUPPORT_IPV6 1)
set(FLUIDSYNTH_SUPPORT_LADSPA )
set(FLUIDSYNTH_SUPPORT_LASH )
set(FLUIDSYNTH_SUPPORT_NETWORK 1)
set(FLUIDSYNTH_SUPPORT_READLINE )
set(FLUIDSYNTH_SUPPORT_SYSTEMD )
# Extra info
set(FLUIDSYNTH_IS_SHARED NO)
set(FLUIDSYNTH_SUPPORT_COVERAGE )
set(FLUIDSYNTH_SUPPORT_FLOAT )
set(FLUIDSYNTH_SUPPORT_FPECHECK )
set(FLUIDSYNTH_SUPPORT_FPETRAP )
set(FLUIDSYNTH_SUPPORT_OPENMP )
set(FLUIDSYNTH_SUPPORT_PROFILING )
set(FLUIDSYNTH_SUPPORT_THREADS 1)
set(FLUIDSYNTH_SUPPORT_UBSAN )
# Only load dependencies on static builds
if(NOT FLUIDSYNTH_IS_SHARED)
# Allows CMake to use the additional modules
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
# Make searching for packages easier on VCPKG
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.15 AND VCPKG_TOOLCHAIN)
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
endif()
# Load the pkg-config helpers
include(PkgConfigHelpers)
# Check the system has a separated math library
find_library(HAS_LIBM NAMES "m" NO_CACHE)
if(HAS_LIBM)
set(MATH_LIBRARY "m")
endif(HAS_LIBM)
# Load find_dependency macro
include(CMakeFindDependencyMacro)
# Mandatory dependencies
if(NOT TARGET Threads::Threads)
find_dependency(Threads)
endif()
if(NOT TARGET GLib2::glib-2 OR NOT TARGET GLib2::gthread-2)
find_dependency(GLib2 2.6.5)
endif()
# Optional dependencies
if(FLUIDSYNTH_SUPPORT_ALSA AND NOT TARGET ALSA::ALSA)
find_dependency(ALSA 0.9.1)
endif()
if(FLUIDSYNTH_SUPPORT_DBUS AND NOT TARGET dbus-1)
find_dependency(DBus1 1.11.12)
endif()
if(FLUIDSYNTH_SUPPORT_JACK AND NOT TARGET Jack::Jack)
find_dependency(Jack)
endif()
if(FLUIDSYNTH_SUPPORT_LADSPA AND NOT TARGET GLib2::gmodule-2)
message(WARN "LADSPA support was built in but gmodule could not be found.")
endif()
if(FLUIDSYNTH_SUPPORT_LASH AND NOT TARGET LASH::LASH)
find_dependency(LASH 0.3)
endif()
if(FLUIDSYNTH_SUPPORT_LIBINSTPATCH AND NOT TARGET InstPatch::libinstpatch)
find_dependency(InstPatch 1.1.0)
endif()
if(FLUIDSYNTH_SUPPORT_LIBSNDFILE AND NOT TARGET SndFile::sndfile)
find_dependency(SndFile 1.0.0)
endif()
if(FLUIDSYNTH_SUPPORT_MIDISHARE AND NOT TARGET MidiShare::MidiShare)
find_dependency(MidiShare)
endif()
if(FLUIDSYNTH_SUPPORT_OBOE AND NOT TARGET oboe::oboe)
find_dependency(oboe)
endif()
if(FLUIDSYNTH_SUPPORT_OPENMP AND NOT TARGET OpenMP::OpenMP_C)
find_dependency(OpenMP COMPONENTS C)
endif()
if(FLUIDSYNTH_SUPPORT_OPENSLES AND NOT TARGET OpenSLES::OpenSLES)
find_dependency(OpenSLES)
endif()
if(FLUIDSYNTH_SUPPORT_PIPEWIRE AND NOT TARGET PipeWire::PipeWire)
find_dependency(PipeWire 0.3)
endif()
if(FLUIDSYNTH_SUPPORT_PORTAUDIO AND NOT TARGET PortAudio::PortAudio)
find_dependency(PortAudio 2.19)
endif()
if(FLUIDSYNTH_SUPPORT_READLINE AND NOT TARGET Readline::Readline)
find_dependency(Readline)
endif()
if(FLUIDSYNTH_SUPPORT_SDL2 AND NOT TARGET SDL2::SDL2)
find_dependency(SDL2)
endif()
if(FLUIDSYNTH_SUPPORT_SYSTEMD AND NOT Systemd::libsystemd)
find_dependency(Systemd)
endif()
# Restore the module path
list(REMOVE_ITEM CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
endif()
# finally, include the targets file # finally, include the targets file
include("${CMAKE_CURRENT_LIST_DIR}/FluidSynthTargets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/FluidSynthTargets.cmake")

View file

@ -10,13 +10,13 @@
# The variable CVF_VERSION must be set before calling configure_file(). # The variable CVF_VERSION must be set before calling configure_file().
set(PACKAGE_VERSION "2.3.1") set(PACKAGE_VERSION "2.3.2")
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE) set(PACKAGE_VERSION_COMPATIBLE FALSE)
else() else()
if("2.3.1" MATCHES "^([0-9]+)\\.([0-9]+)") if("2.3.2" MATCHES "^([0-9]+)\\.([0-9]+)")
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
set(CVF_VERSION_MINOR "${CMAKE_MATCH_2}") set(CVF_VERSION_MINOR "${CMAKE_MATCH_2}")
@ -27,7 +27,7 @@ else()
string(REGEX REPLACE "^0+" "" CVF_VERSION_MINOR "${CVF_VERSION_MINOR}") string(REGEX REPLACE "^0+" "" CVF_VERSION_MINOR "${CVF_VERSION_MINOR}")
endif() endif()
else() else()
set(CVF_VERSION_MAJOR "2.3.1") set(CVF_VERSION_MAJOR "2.3.2")
set(CVF_VERSION_MINOR "") set(CVF_VERSION_MINOR "")
endif() endif()

View file

@ -11,8 +11,8 @@ set_target_properties(FluidSynth::fluidsynth PROPERTIES
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/fluidsynth" IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/fluidsynth"
) )
list(APPEND _IMPORT_CHECK_TARGETS FluidSynth::fluidsynth ) list(APPEND _cmake_import_check_targets FluidSynth::fluidsynth )
list(APPEND _IMPORT_CHECK_FILES_FOR_FluidSynth::fluidsynth "${_IMPORT_PREFIX}/bin/fluidsynth" ) list(APPEND _cmake_import_check_files_for_FluidSynth::fluidsynth "${_IMPORT_PREFIX}/bin/fluidsynth" )
# Import target "FluidSynth::libfluidsynth" for configuration "Release" # Import target "FluidSynth::libfluidsynth" for configuration "Release"
set_property(TARGET FluidSynth::libfluidsynth APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) set_property(TARGET FluidSynth::libfluidsynth APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
@ -21,8 +21,8 @@ set_target_properties(FluidSynth::libfluidsynth PROPERTIES
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libfluidsynth.a" IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libfluidsynth.a"
) )
list(APPEND _IMPORT_CHECK_TARGETS FluidSynth::libfluidsynth ) list(APPEND _cmake_import_check_targets FluidSynth::libfluidsynth )
list(APPEND _IMPORT_CHECK_FILES_FOR_FluidSynth::libfluidsynth "${_IMPORT_PREFIX}/lib/libfluidsynth.a" ) list(APPEND _cmake_import_check_files_for_FluidSynth::libfluidsynth "${_IMPORT_PREFIX}/lib/libfluidsynth.a" )
# Commands beyond this point should not need to know the version. # Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION) set(CMAKE_IMPORT_FILE_VERSION)

View file

@ -1,10 +1,13 @@
# Generated by CMake # Generated by CMake
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
message(FATAL_ERROR "CMake >= 2.6.0 required") message(FATAL_ERROR "CMake >= 2.8.0 required")
endif()
if(CMAKE_VERSION VERSION_LESS "2.8.3")
message(FATAL_ERROR "CMake >= 2.8.3 required")
endif() endif()
cmake_policy(PUSH) cmake_policy(PUSH)
cmake_policy(VERSION 2.6...3.19) cmake_policy(VERSION 2.8.3...3.23)
#---------------------------------------------------------------- #----------------------------------------------------------------
# Generated CMake target import file. # Generated CMake target import file.
#---------------------------------------------------------------- #----------------------------------------------------------------
@ -13,32 +16,34 @@ cmake_policy(VERSION 2.6...3.19)
set(CMAKE_IMPORT_FILE_VERSION 1) set(CMAKE_IMPORT_FILE_VERSION 1)
# Protect against multiple inclusion, which would fail when already imported targets are added once more. # Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_targetsDefined) set(_cmake_targets_defined "")
set(_targetsNotDefined) set(_cmake_targets_not_defined "")
set(_expectedTargets) set(_cmake_expected_targets "")
foreach(_expectedTarget FluidSynth::libfluidsynth-OBJ FluidSynth::fluidsynth FluidSynth::libfluidsynth) foreach(_cmake_expected_target IN ITEMS FluidSynth::libfluidsynth-OBJ FluidSynth::fluidsynth FluidSynth::libfluidsynth)
list(APPEND _expectedTargets ${_expectedTarget}) list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
if(NOT TARGET ${_expectedTarget}) if(TARGET "${_cmake_expected_target}")
list(APPEND _targetsNotDefined ${_expectedTarget}) list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
endif() else()
if(TARGET ${_expectedTarget}) list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
list(APPEND _targetsDefined ${_expectedTarget})
endif() endif()
endforeach() endforeach()
if("${_targetsDefined}" STREQUAL "${_expectedTargets}") unset(_cmake_expected_target)
unset(_targetsDefined) if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
unset(_targetsNotDefined) unset(_cmake_targets_defined)
unset(_expectedTargets) unset(_cmake_targets_not_defined)
set(CMAKE_IMPORT_FILE_VERSION) unset(_cmake_expected_targets)
unset(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP) cmake_policy(POP)
return() return()
endif() endif()
if(NOT "${_targetsDefined}" STREQUAL "") if(NOT _cmake_targets_defined STREQUAL "")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
endif() endif()
unset(_targetsDefined) unset(_cmake_targets_defined)
unset(_targetsNotDefined) unset(_cmake_targets_not_defined)
unset(_expectedTargets) unset(_cmake_expected_targets)
# Compute the installation prefix relative to this file. # Compute the installation prefix relative to this file.
@ -54,7 +59,7 @@ endif()
add_library(FluidSynth::libfluidsynth-OBJ INTERFACE IMPORTED) add_library(FluidSynth::libfluidsynth-OBJ INTERFACE IMPORTED)
set_target_properties(FluidSynth::libfluidsynth-OBJ PROPERTIES set_target_properties(FluidSynth::libfluidsynth-OBJ PROPERTIES
INTERFACE_LINK_LIBRARIES "-Wl,-framework,CoreAudio,-framework,AudioUnit;-Wl,-framework,CoreMIDI,-framework,CoreServices;m;PkgConfig::GLIB;PkgConfig::LIBSNDFILE;PkgConfig::LIBINSTPATCH" INTERFACE_LINK_LIBRARIES "-Wl,-framework,CoreAudio,-framework,AudioUnit;-Wl,-framework,CoreMIDI,-framework,CoreServices;m;Threads::Threads;GLib2::glib-2;GLib2::gthread-2;SndFile::sndfile;InstPatch::libinstpatch"
) )
# Create imported target FluidSynth::fluidsynth # Create imported target FluidSynth::fluidsynth
@ -73,21 +78,22 @@ if(CMAKE_VERSION VERSION_LESS 3.0.0)
endif() endif()
# Load information for each installed configuration. # Load information for each installed configuration.
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/FluidSynthTargets-*.cmake")
file(GLOB CONFIG_FILES "${_DIR}/FluidSynthTargets-*.cmake") foreach(_cmake_config_file IN LISTS _cmake_config_files)
foreach(f ${CONFIG_FILES}) include("${_cmake_config_file}")
include(${f})
endforeach() endforeach()
unset(_cmake_config_file)
unset(_cmake_config_files)
# Cleanup temporary variables. # Cleanup temporary variables.
set(_IMPORT_PREFIX) set(_IMPORT_PREFIX)
# Loop over all imported files and verify that they actually exist # Loop over all imported files and verify that they actually exist
foreach(target ${_IMPORT_CHECK_TARGETS} ) foreach(_cmake_target IN LISTS _cmake_import_check_targets)
foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
if(NOT EXISTS "${file}" ) if(NOT EXISTS "${_cmake_file}")
message(FATAL_ERROR "The imported target \"${target}\" references the file message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
\"${file}\" \"${_cmake_file}\"
but this file does not exist. Possible reasons include: but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location. * The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully. * An install or uninstall procedure did not complete successfully.
@ -97,9 +103,11 @@ but not all the files it references.
") ")
endif() endif()
endforeach() endforeach()
unset(_IMPORT_CHECK_FILES_FOR_${target}) unset(_cmake_file)
unset("_cmake_import_check_files_for_${_cmake_target}")
endforeach() endforeach()
unset(_IMPORT_CHECK_TARGETS) unset(_cmake_target)
unset(_cmake_import_check_targets)
# This file does not depend on other imported targets which have # This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set. # been exported from the same project but in a separate export set.

View file

@ -0,0 +1,95 @@
macro ( sanitize_property_dirs target property )
set(_cleandirs)
get_target_property(_dirs ${target} ${property})
if(_dirs)
foreach(_d IN LISTS _dirs)
if(EXISTS ${_d})
list(APPEND _cleandirs ${_d})
else()
message(DEBUG "removing spurious directory ${_d} from property ${property} of target ${target}")
endif()
endforeach()
set_property(TARGET ${target} PROPERTY ${property} ${_cleandirs})
endif()
endmacro ( sanitize_property_dirs )
macro ( sanitize_target_dirs target )
if (TARGET ${target})
message(DEBUG "performing sanitize_target_dirs(${target})")
sanitize_property_dirs( ${target} INTERFACE_INCLUDE_DIRECTORIES )
sanitize_property_dirs( ${target} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES )
sanitize_property_dirs( ${target} INTERFACE_LINK_DIRECTORIES )
endif()
endmacro ( sanitize_target_dirs )
macro ( generate_pkgconfig_spec template outfile target )
#message(DEBUG "generate_pkgconfig_spec: ${outfile} from template: ${template}")
if (TARGET ${target})
# retrieve all the private libs we depend on
get_target_property (_libs ${target} INTERFACE_LINK_LIBRARIES)
set(_cleanlibs)
foreach(_lib IN LISTS _libs)
if (TARGET ${_lib})
# All the imported PkgConfig target are explicitly added to PC_REQUIRES_PRIV.
# Do not duplicate them into the Libs.private section, as they will be already part of Requires.private
else()
list(APPEND _cleanlibs ${_lib})
endif()
endforeach()
list(REMOVE_DUPLICATES _cleanlibs)
list ( REMOVE_DUPLICATES PC_LIBS_PRIV )
set (LIBS_PRIVATE ${_cleanlibs} ${PC_LIBS_PRIV})
# make a copy
set ( LIBS_PRIVATE_WITH_PATH ${LIBS_PRIVATE} )
# this matches any path and any flag entries (starting with '-')
set ( LIB_LIST_REGEX "(^(.+)\/([^\/]+)$)|(^\-.*$)" )
# remove all entries from the list which are specified by path and which already have -l
list ( FILTER LIBS_PRIVATE EXCLUDE REGEX ${LIB_LIST_REGEX} )
# include only entries specified by path
list ( FILTER LIBS_PRIVATE_WITH_PATH INCLUDE REGEX ${LIB_LIST_REGEX} )
# prepend the linker flag to all entries except the ones that already have it
list ( TRANSFORM LIBS_PRIVATE PREPEND "-l")
list ( JOIN LIBS_PRIVATE " " LIBS_PRIVATE_JOINED )
list ( JOIN LIBS_PRIVATE_WITH_PATH " " LIBS_PRIVATE_WITH_PATH_JOINED )
list ( JOIN PC_REQUIRES_PRIV " " PC_REQUIRES_PRIV_JOINED )
configure_file ( ${template} ${outfile} IMMEDIATE @ONLY)
endif()
endmacro ( generate_pkgconfig_spec )
macro ( unset_pkg_config _prefix )
unset ( ${_prefix}_VERSION CACHE )
unset ( ${_prefix}_PREFIX CACHE )
unset ( ${_prefix}_CFLAGS CACHE )
unset ( ${_prefix}_CFLAGS_OTHER CACHE )
unset ( ${_prefix}_LDFLAGS CACHE )
unset ( ${_prefix}_LDFLAGS_OTHER CACHE )
unset ( ${_prefix}_LIBRARIES CACHE )
unset ( ${_prefix}_INCLUDEDIR CACHE )
unset ( ${_prefix}_INCLUDE_DIRS CACHE )
unset ( ${_prefix}_LIBDIR CACHE )
unset ( ${_prefix}_LIBRARY_DIRS CACHE )
unset ( __pkg_config_checked_${_prefix} CACHE )
endmacro ( unset_pkg_config )
function ( get_target_properties_from_pkg_config _library _prefix _out_prefix )
if ( "${_library}" MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$" )
set ( _cflags ${_prefix}_STATIC_CFLAGS_OTHER )
set ( _link_libraries ${_prefix}_STATIC_LIBRARIES )
set ( _library_dirs ${_prefix}_STATIC_LIBRARY_DIRS )
else ()
set ( _cflags ${_prefix}_CFLAGS_OTHER )
set ( _link_libraries ${_prefix}_LIBRARIES )
set ( _library_dirs ${_prefix}_LIBRARY_DIRS )
endif ()
# The link_libraries list always starts with the library itself, and POP_FRONT is >=3.15
list(REMOVE_AT "${_link_libraries}" 0)
set ( ${_out_prefix}_compile_options "${${_cflags}}" PARENT_SCOPE )
set ( ${_out_prefix}_link_libraries "${${_link_libraries}}" PARENT_SCOPE )
set ( ${_out_prefix}_link_directories "${${_library_dirs}}" PARENT_SCOPE )
endfunction ( get_target_properties_from_pkg_config )

Binary file not shown.

View file

@ -5,7 +5,7 @@ includedir=${prefix}/include
Name: FluidSynth Name: FluidSynth
Description: Software SoundFont synth Description: Software SoundFont synth
Version: 2.3.1 Version: 2.3.2
Requires.private: glib-2.0 gthread-2.0 sndfile libinstpatch-1.0 Requires.private: glib-2.0 gthread-2.0 sndfile libinstpatch-1.0
Libs: -L${libdir} -lfluidsynth Libs: -L${libdir} -lfluidsynth
Libs.private: -lm -Wl,-framework,CoreAudio,-framework,AudioUnit -Wl,-framework,CoreMIDI,-framework,CoreServices Libs.private: -lm -Wl,-framework,CoreAudio,-framework,AudioUnit -Wl,-framework,CoreMIDI,-framework,CoreServices

View file

@ -9,19 +9,19 @@
# The variable CVF_VERSION must be set before calling configure_file(). # The variable CVF_VERSION must be set before calling configure_file().
set(PACKAGE_VERSION "1.1.11") set(PACKAGE_VERSION "1.1.12")
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE) set(PACKAGE_VERSION_COMPATIBLE FALSE)
else() else()
if("1.1.11" MATCHES "^([0-9]+)\\.") if("1.1.12" MATCHES "^([0-9]+)\\.")
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0) if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}") string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
endif() endif()
else() else()
set(CVF_VERSION_MAJOR "1.1.11") set(CVF_VERSION_MAJOR "1.1.12")
endif() endif()
if(PACKAGE_FIND_VERSION_RANGE) if(PACKAGE_FIND_VERSION_RANGE)

View file

@ -12,8 +12,8 @@ set_target_properties(ZMusic::zmusic PROPERTIES
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libzmusic.a" IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libzmusic.a"
) )
list(APPEND _IMPORT_CHECK_TARGETS ZMusic::zmusic ) list(APPEND _cmake_import_check_targets ZMusic::zmusic )
list(APPEND _IMPORT_CHECK_FILES_FOR_ZMusic::zmusic "${_IMPORT_PREFIX}/lib/libzmusic.a" ) list(APPEND _cmake_import_check_files_for_ZMusic::zmusic "${_IMPORT_PREFIX}/lib/libzmusic.a" )
# Commands beyond this point should not need to know the version. # Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION) set(CMAKE_IMPORT_FILE_VERSION)

View file

@ -1,10 +1,13 @@
# Generated by CMake # Generated by CMake
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
message(FATAL_ERROR "CMake >= 2.6.0 required") message(FATAL_ERROR "CMake >= 2.8.0 required")
endif()
if(CMAKE_VERSION VERSION_LESS "2.8.3")
message(FATAL_ERROR "CMake >= 2.8.3 required")
endif() endif()
cmake_policy(PUSH) cmake_policy(PUSH)
cmake_policy(VERSION 2.6...3.19) cmake_policy(VERSION 2.8.3...3.23)
#---------------------------------------------------------------- #----------------------------------------------------------------
# Generated CMake target import file. # Generated CMake target import file.
#---------------------------------------------------------------- #----------------------------------------------------------------
@ -13,32 +16,34 @@ cmake_policy(VERSION 2.6...3.19)
set(CMAKE_IMPORT_FILE_VERSION 1) set(CMAKE_IMPORT_FILE_VERSION 1)
# Protect against multiple inclusion, which would fail when already imported targets are added once more. # Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_targetsDefined) set(_cmake_targets_defined "")
set(_targetsNotDefined) set(_cmake_targets_not_defined "")
set(_expectedTargets) set(_cmake_expected_targets "")
foreach(_expectedTarget ZMusic::zmusic) foreach(_cmake_expected_target IN ITEMS ZMusic::zmusic)
list(APPEND _expectedTargets ${_expectedTarget}) list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
if(NOT TARGET ${_expectedTarget}) if(TARGET "${_cmake_expected_target}")
list(APPEND _targetsNotDefined ${_expectedTarget}) list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
endif() else()
if(TARGET ${_expectedTarget}) list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
list(APPEND _targetsDefined ${_expectedTarget})
endif() endif()
endforeach() endforeach()
if("${_targetsDefined}" STREQUAL "${_expectedTargets}") unset(_cmake_expected_target)
unset(_targetsDefined) if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
unset(_targetsNotDefined) unset(_cmake_targets_defined)
unset(_expectedTargets) unset(_cmake_targets_not_defined)
set(CMAKE_IMPORT_FILE_VERSION) unset(_cmake_expected_targets)
unset(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP) cmake_policy(POP)
return() return()
endif() endif()
if(NOT "${_targetsDefined}" STREQUAL "") if(NOT _cmake_targets_defined STREQUAL "")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
endif() endif()
unset(_targetsDefined) unset(_cmake_targets_defined)
unset(_targetsNotDefined) unset(_cmake_targets_not_defined)
unset(_expectedTargets) unset(_cmake_expected_targets)
# Compute the installation prefix relative to this file. # Compute the installation prefix relative to this file.
@ -64,21 +69,22 @@ if(CMAKE_VERSION VERSION_LESS 2.8.12)
endif() endif()
# Load information for each installed configuration. # Load information for each installed configuration.
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/ZMusicFullTargets-*.cmake")
file(GLOB CONFIG_FILES "${_DIR}/ZMusicFullTargets-*.cmake") foreach(_cmake_config_file IN LISTS _cmake_config_files)
foreach(f ${CONFIG_FILES}) include("${_cmake_config_file}")
include(${f})
endforeach() endforeach()
unset(_cmake_config_file)
unset(_cmake_config_files)
# Cleanup temporary variables. # Cleanup temporary variables.
set(_IMPORT_PREFIX) set(_IMPORT_PREFIX)
# Loop over all imported files and verify that they actually exist # Loop over all imported files and verify that they actually exist
foreach(target ${_IMPORT_CHECK_TARGETS} ) foreach(_cmake_target IN LISTS _cmake_import_check_targets)
foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
if(NOT EXISTS "${file}" ) if(NOT EXISTS "${_cmake_file}")
message(FATAL_ERROR "The imported target \"${target}\" references the file message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
\"${file}\" \"${_cmake_file}\"
but this file does not exist. Possible reasons include: but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location. * The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully. * An install or uninstall procedure did not complete successfully.
@ -88,9 +94,11 @@ but not all the files it references.
") ")
endif() endif()
endforeach() endforeach()
unset(_IMPORT_CHECK_FILES_FOR_${target}) unset(_cmake_file)
unset("_cmake_import_check_files_for_${_cmake_target}")
endforeach() endforeach()
unset(_IMPORT_CHECK_TARGETS) unset(_cmake_target)
unset(_cmake_import_check_targets)
# This file does not depend on other imported targets which have # This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set. # been exported from the same project but in a separate export set.

View file

@ -12,8 +12,8 @@ set_target_properties(ZMusic::zmusiclite PROPERTIES
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libzmusiclite.a" IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libzmusiclite.a"
) )
list(APPEND _IMPORT_CHECK_TARGETS ZMusic::zmusiclite ) list(APPEND _cmake_import_check_targets ZMusic::zmusiclite )
list(APPEND _IMPORT_CHECK_FILES_FOR_ZMusic::zmusiclite "${_IMPORT_PREFIX}/lib/libzmusiclite.a" ) list(APPEND _cmake_import_check_files_for_ZMusic::zmusiclite "${_IMPORT_PREFIX}/lib/libzmusiclite.a" )
# Commands beyond this point should not need to know the version. # Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION) set(CMAKE_IMPORT_FILE_VERSION)

View file

@ -1,10 +1,13 @@
# Generated by CMake # Generated by CMake
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
message(FATAL_ERROR "CMake >= 2.6.0 required") message(FATAL_ERROR "CMake >= 2.8.0 required")
endif()
if(CMAKE_VERSION VERSION_LESS "2.8.3")
message(FATAL_ERROR "CMake >= 2.8.3 required")
endif() endif()
cmake_policy(PUSH) cmake_policy(PUSH)
cmake_policy(VERSION 2.6...3.19) cmake_policy(VERSION 2.8.3...3.23)
#---------------------------------------------------------------- #----------------------------------------------------------------
# Generated CMake target import file. # Generated CMake target import file.
#---------------------------------------------------------------- #----------------------------------------------------------------
@ -13,32 +16,34 @@ cmake_policy(VERSION 2.6...3.19)
set(CMAKE_IMPORT_FILE_VERSION 1) set(CMAKE_IMPORT_FILE_VERSION 1)
# Protect against multiple inclusion, which would fail when already imported targets are added once more. # Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_targetsDefined) set(_cmake_targets_defined "")
set(_targetsNotDefined) set(_cmake_targets_not_defined "")
set(_expectedTargets) set(_cmake_expected_targets "")
foreach(_expectedTarget ZMusic::zmusiclite) foreach(_cmake_expected_target IN ITEMS ZMusic::zmusiclite)
list(APPEND _expectedTargets ${_expectedTarget}) list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
if(NOT TARGET ${_expectedTarget}) if(TARGET "${_cmake_expected_target}")
list(APPEND _targetsNotDefined ${_expectedTarget}) list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
endif() else()
if(TARGET ${_expectedTarget}) list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
list(APPEND _targetsDefined ${_expectedTarget})
endif() endif()
endforeach() endforeach()
if("${_targetsDefined}" STREQUAL "${_expectedTargets}") unset(_cmake_expected_target)
unset(_targetsDefined) if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
unset(_targetsNotDefined) unset(_cmake_targets_defined)
unset(_expectedTargets) unset(_cmake_targets_not_defined)
set(CMAKE_IMPORT_FILE_VERSION) unset(_cmake_expected_targets)
unset(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP) cmake_policy(POP)
return() return()
endif() endif()
if(NOT "${_targetsDefined}" STREQUAL "") if(NOT _cmake_targets_defined STREQUAL "")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
endif() endif()
unset(_targetsDefined) unset(_cmake_targets_defined)
unset(_targetsNotDefined) unset(_cmake_targets_not_defined)
unset(_expectedTargets) unset(_cmake_expected_targets)
# Compute the installation prefix relative to this file. # Compute the installation prefix relative to this file.
@ -64,21 +69,22 @@ if(CMAKE_VERSION VERSION_LESS 2.8.12)
endif() endif()
# Load information for each installed configuration. # Load information for each installed configuration.
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/ZMusicLiteTargets-*.cmake")
file(GLOB CONFIG_FILES "${_DIR}/ZMusicLiteTargets-*.cmake") foreach(_cmake_config_file IN LISTS _cmake_config_files)
foreach(f ${CONFIG_FILES}) include("${_cmake_config_file}")
include(${f})
endforeach() endforeach()
unset(_cmake_config_file)
unset(_cmake_config_files)
# Cleanup temporary variables. # Cleanup temporary variables.
set(_IMPORT_PREFIX) set(_IMPORT_PREFIX)
# Loop over all imported files and verify that they actually exist # Loop over all imported files and verify that they actually exist
foreach(target ${_IMPORT_CHECK_TARGETS} ) foreach(_cmake_target IN LISTS _cmake_import_check_targets)
foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
if(NOT EXISTS "${file}" ) if(NOT EXISTS "${_cmake_file}")
message(FATAL_ERROR "The imported target \"${target}\" references the file message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
\"${file}\" \"${_cmake_file}\"
but this file does not exist. Possible reasons include: but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location. * The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully. * An install or uninstall procedure did not complete successfully.
@ -88,9 +94,11 @@ but not all the files it references.
") ")
endif() endif()
endforeach() endforeach()
unset(_IMPORT_CHECK_FILES_FOR_${target}) unset(_cmake_file)
unset("_cmake_import_check_files_for_${_cmake_target}")
endforeach() endforeach()
unset(_IMPORT_CHECK_TARGETS) unset(_cmake_target)
unset(_cmake_import_check_targets)
# This file does not depend on other imported targets which have # This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set. # been exported from the same project but in a separate export set.

Binary file not shown.

Binary file not shown.