mirror of
https://github.com/ZDoom/ZMusic.git
synced 2024-11-23 12:22:30 +00:00
- fixed compilation on Mac.
Linking still does not work...
This commit is contained in:
parent
da12efde2b
commit
dad5c5a765
7 changed files with 18 additions and 14 deletions
|
@ -142,8 +142,8 @@ use_fast_math(zmusiclite)
|
||||||
target_include_directories(zmusic INTERFACE $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${ZMusic_SOURCE_DIR}/include>)
|
target_include_directories(zmusic INTERFACE $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${ZMusic_SOURCE_DIR}/include>)
|
||||||
target_include_directories(zmusiclite INTERFACE $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${ZMusic_SOURCE_DIR}/include>)
|
target_include_directories(zmusiclite INTERFACE $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${ZMusic_SOURCE_DIR}/include>)
|
||||||
|
|
||||||
target_link_libraries_hidden(zmusic zmusic-obj adl oplsynth opn timidity timidityplus wildmidi libfluidsynth)
|
target_link_libraries_hidden(zmusic zmusic-obj adl oplsynth opn timidity timidityplus wildmidi fluidsynth)
|
||||||
target_link_libraries_hidden(zmusiclite zmusic-obj libfluidsynth)
|
target_link_libraries_hidden(zmusiclite zmusic-obj fluidsynth)
|
||||||
|
|
||||||
target_compile_definitions(zmusic PUBLIC $<$<STREQUAL:$<TARGET_PROPERTY:zmusic,TYPE>,STATIC_LIBRARY>:ZMUSIC_STATIC>)
|
target_compile_definitions(zmusic PUBLIC $<$<STREQUAL:$<TARGET_PROPERTY:zmusic,TYPE>,STATIC_LIBRARY>:ZMUSIC_STATIC>)
|
||||||
target_compile_definitions(zmusiclite PRIVATE ZMUSIC_LITE=1 PUBLIC $<$<STREQUAL:$<TARGET_PROPERTY:zmusiclite,TYPE>,STATIC_LIBRARY>:ZMUSIC_STATIC>)
|
target_compile_definitions(zmusiclite PRIVATE ZMUSIC_LITE=1 PUBLIC $<$<STREQUAL:$<TARGET_PROPERTY:zmusiclite,TYPE>,STATIC_LIBRARY>:ZMUSIC_STATIC>)
|
||||||
|
|
|
@ -50,7 +50,7 @@ FModule SndFileModule{"SndFile"};
|
||||||
#define SNDFILELIB "libsndfile.so.1"
|
#define SNDFILELIB "libsndfile.so.1"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern "C" bool IsSndFilePresent()
|
extern "C" int IsSndFilePresent()
|
||||||
{
|
{
|
||||||
#if !defined DYN_SNDFILE
|
#if !defined DYN_SNDFILE
|
||||||
return true;
|
return true;
|
||||||
|
@ -235,7 +235,7 @@ extern "C" int sf_close(SNDFILE * sndfile)
|
||||||
|
|
||||||
#else // in case someone decided to build without sndfile support
|
#else // in case someone decided to build without sndfile support
|
||||||
|
|
||||||
extern "C" bool IsSndFilePresent()
|
extern "C" int IsSndFilePresent()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#ifndef SNDDEF_H
|
#ifndef SNDDEF_H
|
||||||
#define SNDDEF_H
|
#define SNDDEF_H
|
||||||
|
|
||||||
extern "C" bool IsSndFilePresent();
|
|
||||||
|
|
||||||
|
|
||||||
#if defined HAVE_SNDFILE && defined DYN_SNDFILE
|
#if defined HAVE_SNDFILE && defined DYN_SNDFILE
|
||||||
|
|
9
thirdparty/fluidsynth/src/CMakeLists.txt
vendored
9
thirdparty/fluidsynth/src/CMakeLists.txt
vendored
|
@ -157,17 +157,16 @@ target_include_directories ( libfluidsynth-OBJ PRIVATE
|
||||||
# Further note: The headers must be explicitly added here to have CMake install
|
# Further note: The headers must be explicitly added here to have CMake install
|
||||||
# them correctly in case of MACOSX_FRAMEWORK
|
# them correctly in case of MACOSX_FRAMEWORK
|
||||||
set ( BUILD_SHARED_LIBS 0 )
|
set ( BUILD_SHARED_LIBS 0 )
|
||||||
add_library ( libfluidsynth
|
add_library ( fluidsynth
|
||||||
$<TARGET_OBJECTS:libfluidsynth-OBJ>
|
$<TARGET_OBJECTS:libfluidsynth-OBJ>
|
||||||
${public_main_HEADER}
|
${public_main_HEADER}
|
||||||
${public_HEADERS}
|
${public_HEADERS}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
if ( TARGET PkgConfig::GLIB )
|
find_package(PkgConfig REQUIRED)
|
||||||
target_link_libraries ( libfluidsynth-OBJ PUBLIC PkgConfig::GLIB )
|
pkg_search_module(GLIB REQUIRED glib-2.0)
|
||||||
else()
|
|
||||||
target_include_directories ( libfluidsynth-OBJ PUBLIC ${GLIB_INCLUDE_DIRS} )
|
target_include_directories ( libfluidsynth-OBJ PUBLIC ${GLIB_INCLUDE_DIRS} )
|
||||||
target_link_libraries ( libfluidsynth-OBJ PUBLIC ${GLIB_LIBRARIES} )
|
target_link_libraries ( libfluidsynth-OBJ PUBLIC ${GLIB_LIBRARIES} )
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
6
thirdparty/fluidsynth/src/config.h
vendored
6
thirdparty/fluidsynth/src/config.h
vendored
|
@ -41,7 +41,9 @@
|
||||||
/* #undef HAVE_INTTYPES_H */
|
/* #undef HAVE_INTTYPES_H */
|
||||||
|
|
||||||
/* Define to 1 if you have the <io.h> header file. */
|
/* Define to 1 if you have the <io.h> header file. */
|
||||||
|
#ifdef _WIN32
|
||||||
#define HAVE_IO_H 1
|
#define HAVE_IO_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* whether or not we are supporting lash */
|
/* whether or not we are supporting lash */
|
||||||
/* #undef HAVE_LASH */
|
/* #undef HAVE_LASH */
|
||||||
|
@ -116,7 +118,9 @@
|
||||||
#define HAVE_SYS_TYPES_H 1
|
#define HAVE_SYS_TYPES_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <unistd.h> header file. */
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
/* #undef HAVE_UNISTD_H */
|
#ifndef _WIN32
|
||||||
|
#define HAVE_UNISTD_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to 1 if you have the <windows.h> header file. */
|
/* Define to 1 if you have the <windows.h> header file. */
|
||||||
#define HAVE_WINDOWS_H 1
|
#define HAVE_WINDOWS_H 1
|
||||||
|
|
|
@ -2415,6 +2415,8 @@ static sf_count_t sfvio_tell(void *user_data)
|
||||||
return data->offset;
|
return data->offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int IsSndFilePresent();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read Ogg Vorbis compressed data from the Soundfont and decompress it, returning the number of samples
|
* Read Ogg Vorbis compressed data from the Soundfont and decompress it, returning the number of samples
|
||||||
* in the decompressed WAV. Only 16-bit mono samples are supported.
|
* in the decompressed WAV. Only 16-bit mono samples are supported.
|
||||||
|
|
2
thirdparty/fluidsynth/src/sfloader/sndfile.h
vendored
2
thirdparty/fluidsynth/src/sfloader/sndfile.h
vendored
|
@ -362,7 +362,7 @@ typedef struct sf_private_tag SNDFILE ;
|
||||||
** and the Microsoft compiler.
|
** and the Microsoft compiler.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef __int64 sf_count_t ;
|
typedef int64_t sf_count_t ;
|
||||||
#ifndef SF_COUNT_MAX
|
#ifndef SF_COUNT_MAX
|
||||||
#define SF_COUNT_MAX 0x7FFFFFFFFFFFFFFFLL
|
#define SF_COUNT_MAX 0x7FFFFFFFFFFFFFFFLL
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue