mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 06:51:54 +00:00
Only require gmodule if LADSPA is enabled
Also remove the now unused libdl support, as it was only used by LADSPA, which has been changed to use gmodule instead.
This commit is contained in:
parent
4806fc6a14
commit
89646783d1
3 changed files with 16 additions and 24 deletions
|
@ -256,19 +256,6 @@ if ( enable-profiling )
|
|||
set ( WITH_PROFILING 1 )
|
||||
endif ( enable-profiling )
|
||||
|
||||
unset ( HAVE_LIBDL CACHE )
|
||||
unset ( LADSPA_SUPPORT CACHE )
|
||||
if ( enable-ladspa )
|
||||
check_include_file ( ladspa.h LADSPA_SUPPORT )
|
||||
if ( LADSPA_SUPPORT )
|
||||
set ( LADSPA 1 )
|
||||
if ( CMAKE_DL_LIBS )
|
||||
set ( HAVE_LIBDL 1 )
|
||||
set ( LIBFLUID_LIBS "${LIBFLUID_LIBS};${CMAKE_DL_LIBS}" )
|
||||
endif ( CMAKE_DL_LIBS )
|
||||
endif ( LADSPA_SUPPORT )
|
||||
endif ( enable-ladspa )
|
||||
|
||||
unset ( ENABLE_TRAPONFPE CACHE )
|
||||
unset ( TRAP_ON_FPE CACHE )
|
||||
if ( enable-trap-on-fpe AND NOT APPLE AND NOT WIN32 )
|
||||
|
@ -303,22 +290,20 @@ endif ( CMAKE_BUILD_TYPE MATCHES "Debug" )
|
|||
|
||||
if(NOT enable-pkgconfig)
|
||||
|
||||
FIND_LIBRARY( GLIB_LIB NAMES glib glib-2.0 PATH GLIB_LIBRARY_DIR NO_DEFAULT_PATH)
|
||||
FIND_LIBRARY( GTHREAD_LIB NAMES gthread gthread-2.0 PATH GTHREAD_LIBRARY_DIR NO_DEFAULT_PATH )
|
||||
FIND_LIBRARY( GMODULE_LIB NAMES gmodule gmodule-2.0 PATH GMODULE_LIBRARY_DIR NO_DEFAULT_PATH )
|
||||
FIND_PATH( GLIBH_DIR glib.h PATH GLIB_INCLUDE_DIR NO_DEFAULT_PATH )
|
||||
FIND_PATH( GLIBCONF_DIR glibconfig.h PATH GLIBCONF_INCLUDE_DIR NO_DEFAULT_PATH )
|
||||
FIND_LIBRARY( GLIB_LIB NAMES glib glib-2.0 PATH GLIB_LIBRARY_DIR )
|
||||
FIND_LIBRARY( GTHREAD_LIB NAMES gthread gthread-2.0 PATH GTHREAD_LIBRARY_DIR )
|
||||
FIND_PATH( GLIBH_DIR glib.h PATH GLIB_INCLUDE_DIR )
|
||||
FIND_PATH( GLIBCONF_DIR glibconfig.h PATH GLIBCONF_INCLUDE_DIR )
|
||||
|
||||
IF( GLIB_LIB MATCHES "GLIB_LIB-NOTFOUND" OR
|
||||
GTHREAD_LIB MATCHES "GTHREAD_LIB-NOTFOUND" OR
|
||||
GMODULE_LIB MATCHES "GMODULE_LIB-NOTFOUND" OR
|
||||
GLIBH_DIR MATCHES "GLIBH_DIR-NOTFOUND" OR
|
||||
GLIBCONF_DIR MATCHES "GLIBCONF_DIR-NOTFOUND")
|
||||
message( WARNING "Not sure if I found GLIB, continuing anyway.")
|
||||
ENDIF()
|
||||
|
||||
SET( GLIB_INCLUDE_DIRS ${GLIBH_DIR} ${GLIBCONF_DIR} )
|
||||
SET( GLIB_LIBRARIES ${GLIB_LIB} ${GTHREAD_LIB} ${GMODULE_LIB} )
|
||||
SET( GLIB_LIBRARIES ${GLIB_LIB} ${GTHREAD_LIB} )
|
||||
|
||||
message( STATUS "GLIB_INCLUDE_DIRS: " ${GLIB_INCLUDE_DIRS} )
|
||||
message( STATUS "GLIB_LIBRARIES: " ${GLIB_LIBRARIES} )
|
||||
|
@ -328,7 +313,7 @@ else(NOT enable-pkgconfig)
|
|||
find_package ( PkgConfig REQUIRED )
|
||||
|
||||
# Mandatory libraries: glib and gthread
|
||||
pkg_check_modules ( GLIB REQUIRED glib-2.0>=2.6.5 gthread-2.0>=2.6.5 gmodule-2.0>=2.6.5 )
|
||||
pkg_check_modules ( GLIB REQUIRED glib-2.0>=2.6.5 gthread-2.0>=2.6.5 )
|
||||
|
||||
include ( UnsetPkgConfig )
|
||||
|
||||
|
@ -398,6 +383,15 @@ else(NOT enable-pkgconfig)
|
|||
else ( enable-dbus )
|
||||
unset_pkg_config ( DBUS )
|
||||
endif ( enable-dbus )
|
||||
|
||||
unset ( LADSPA_SUPPORT CACHE )
|
||||
if ( enable-ladspa )
|
||||
check_include_file ( ladspa.h LADSPA_SUPPORT )
|
||||
if ( LADSPA_SUPPORT )
|
||||
pkg_check_modules ( GMODULE REQUIRED gmodule-2.0>=2.6.5 )
|
||||
set ( LADSPA 1 )
|
||||
endif ( LADSPA_SUPPORT )
|
||||
endif ( enable-ladspa )
|
||||
|
||||
endif(NOT enable-pkgconfig)
|
||||
|
||||
|
|
|
@ -292,6 +292,7 @@ endif ( LIBFLUID_CPPFLAGS )
|
|||
|
||||
target_link_libraries ( libfluidsynth
|
||||
${GLIB_LIBRARIES}
|
||||
${GMODULE_LIBRARIES}
|
||||
${LASH_LIBRARIES}
|
||||
${JACK_LIBRARIES}
|
||||
${ALSA_LIBRARIES}
|
||||
|
|
|
@ -46,9 +46,6 @@
|
|||
/* whether or not we are supporting lash */
|
||||
#cmakedefine HAVE_LASH @HAVE_LASH@
|
||||
|
||||
/* Define to 1 if you have the `dl' library (-ldl). */
|
||||
#cmakedefine HAVE_LIBDL @HAVE_LIBDL@
|
||||
|
||||
/* Define to 1 if you have the `MidiShare' library (-lMidiShare). */
|
||||
#cmakedefine HAVE_LIBMIDISHARE @HAVE_LIBMIDISHARE@
|
||||
|
||||
|
|
Loading…
Reference in a new issue