mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-02 09:02:19 +00:00
Merge pull request #967 from FluidSynth/revert-943-wip-cmake-export-targets
Reverts most of #943 on master as it accidentally broke compilation with CMake < 3.11, but keep the build files for OBS.
This commit is contained in:
commit
f6fa0290b7
3 changed files with 0 additions and 57 deletions
|
@ -856,33 +856,6 @@ configure_file ( fluidsynth.pc.in
|
|||
install ( FILES ${CMAKE_BINARY_DIR}/fluidsynth.pc
|
||||
DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
|
||||
|
||||
# Exported targets for cmake: find_package(FluidSynth)
|
||||
# when installed, use CMAKE_PREFIX_PATH=fluidsynth-prefix;...
|
||||
# to use the build directory directly set the FluidSynth_DIR variable instead.
|
||||
|
||||
# targets in the build directory
|
||||
export(EXPORT FluidSynthTargets
|
||||
FILE "${CMAKE_CURRENT_BINARY_DIR}/FluidSynthTargets.cmake"
|
||||
NAMESPACE FluidSynth::
|
||||
)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
write_basic_package_version_file(
|
||||
FluidSynthConfigVersion.cmake
|
||||
VERSION ${VERSION}
|
||||
COMPATIBILITY SameMinorVersion
|
||||
)
|
||||
|
||||
# Here, configure_file() is used instead of the more orthodox macro
|
||||
# configure_package_config_file() because the latter does not
|
||||
# support generating a config.cmake file for both the installed
|
||||
# package and for using the build directory directly.
|
||||
configure_file(FluidSynthConfig.cmake.in FluidSynthConfig.cmake @ONLY)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/FluidSynthConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/FluidSynthConfigVersion.cmake"
|
||||
DESTINATION ${LIB_INSTALL_DIR}/cmake/fluidsynth
|
||||
)
|
||||
|
||||
# Extra targets for Unix build environments
|
||||
if ( UNIX )
|
||||
if ( DEFINED FLUID_DAEMON_ENV_FILE)
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
# for the find_dependency() macro:
|
||||
# include(CMakeFindDependencyMacro)
|
||||
# it has the same syntax as find_package:
|
||||
# find_dependency(MYDEP REQUIRED)
|
||||
|
||||
# define variables for configuration options:
|
||||
# set(network-enabled @enable-network@)
|
||||
|
||||
# finally, include the targets file
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/FluidSynthTargets.cmake")
|
|
@ -395,20 +395,16 @@ target_link_libraries ( fluidsynth
|
|||
libfluidsynth
|
||||
${SYSTEMD_LIBRARIES}
|
||||
${FLUID_LIBS}
|
||||
${GLIB_LIBRARIES} # because g_file_test()
|
||||
${SDL2_LIBRARIES} # because SDL_Init() etc.
|
||||
)
|
||||
|
||||
if ( MACOSX_FRAMEWORK )
|
||||
install ( TARGETS fluidsynth libfluidsynth
|
||||
EXPORT FluidSynthTargets
|
||||
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
|
||||
FRAMEWORK DESTINATION ${FRAMEWORK_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${FRAMEWORK_INSTALL_DIR}
|
||||
)
|
||||
else ( MACOSX_FRAMEWORK )
|
||||
install ( TARGETS fluidsynth libfluidsynth
|
||||
EXPORT FluidSynthTargets
|
||||
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
|
||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
||||
|
@ -417,22 +413,6 @@ else ( MACOSX_FRAMEWORK )
|
|||
install ( FILES ${public_main_HEADER} DESTINATION ${INCLUDE_INSTALL_DIR} )
|
||||
endif ( MACOSX_FRAMEWORK )
|
||||
|
||||
# Exported targets.
|
||||
|
||||
# build_interface: for the libfluidsynth target when imported from the build directory.
|
||||
# install_interface: for the target when imported from the installed directory.
|
||||
target_include_directories(libfluidsynth PUBLIC
|
||||
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/;${PROJECT_BINARY_DIR}/include/>"
|
||||
"$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>"
|
||||
)
|
||||
|
||||
# installation of the exported targets
|
||||
install(EXPORT FluidSynthTargets
|
||||
FILE FluidSynthTargets.cmake
|
||||
NAMESPACE FluidSynth::
|
||||
DESTINATION ${LIB_INSTALL_DIR}/cmake/fluidsynth
|
||||
)
|
||||
|
||||
# ******* Auto Generated Lookup Tables ******
|
||||
|
||||
include(ExternalProject)
|
||||
|
|
Loading…
Reference in a new issue