Revert "cmake: export targets"

This commit is contained in:
Tom M 2021-08-30 16:07:53 +02:00 committed by GitHub
parent ec0d6e011e
commit fab1ca1ca9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 80 additions and 400 deletions

View file

@ -856,35 +856,12 @@ 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 )
# RPM spec
configure_file ( fluidsynth.spec.in
${CMAKE_BINARY_DIR}/fluidsynth.spec IMMEDIATE @ONLY )
if ( DEFINED FLUID_DAEMON_ENV_FILE)
configure_file ( fluidsynth.service.in
${CMAKE_BINARY_DIR}/fluidsynth.service @ONLY )

View 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")

View file

@ -1 +0,0 @@
libfluidsynth2

View file

@ -1,23 +0,0 @@
fluidsynth (1.1.8-1) unstable; urgency=low
- Update to version 1.1.8:
* fix build against glib < 2.30 (#202)
* fix dsound audio driver on windows (#215)
* fix a bug around `synth.audio-groups` setting, which caused improper multi-channel rendering (#225)
* cmake 3.0.2 is now required
* compilation with clang is now possible
* build fixes on OS/2 (thanks to @komh)
-- Tom Moebert <tom.mbrt@googlemail.com> Fri, 13 Oct 2017 15:53:00 +0000
fluidsynth (1.1.7-1) unstable; urgency=low
* OBS snapshot.
-- Rui Nuno Capela <rncbc@rncbc.org> Tue, 5 Sep 2017 20:00:00 +0000
fluidsynth (1.1.6-1) unstable; urgency=low
* OBS snapshot.
-- Rui Nuno Capela <rncbc@rncbc.org> Sun, 19 Aug 2012 23:45:01 +0000

View file

@ -1 +0,0 @@
9

View file

@ -1,34 +0,0 @@
Source: fluidsynth
Priority: optional
Section: sound
Maintainer: Rui Nuno Capela <rncbc@rncbc.org>
Build-Depends: debhelper (>= 5.0.0), cmake, pkg-config, libdb-dev, libjack-dev, libasound2-dev,
libsndfile-dev, libglib2.0-dev
Standards-Version: 3.7.2
Package: libfluidsynth1
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: FluidSynth is a real-time software synthesizer
FluidSynth is a real-time software synthesizer based on
the SoundFont 2 specifications.
Package: libfluidsynth-dev
Section: libdevel
Architecture: any
Depends: libfluidsynth1 (= ${source:Version})
Description: FluidSynth is a real-time software synthesizer
FluidSynth is a real-time software synthesizer based on
the SoundFont 2 specifications.
This package contains the header file required for compiling
hosts and plugins.
Package: fluidsynth
Section: sound
Architecture: any
Depends: libfluidsynth1 (= ${source:Version})
Description: FluidSynth is a real-time software synthesizer
FluidSynth is a real-time software synthesizer based on
the SoundFont 2 specifications.
This package contains the command-line utilities.

View file

@ -1,30 +0,0 @@
This package was debianized by Rui Nuno Capela <rncbc@rncbc.org> on
Mon, 25 Jun 2007 10:42:40 +0100.
It was downloaded from http://www.fluidsynth.org
Upstream Author: Rui Nuno Capela <rncbc@rncbc.org>
Copyright:
Copyright (C) 2003-2015, rncbc aka Rui Nuno Capela. All rights reserved.
License:
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
The Debian packaging is (C) 2007-2013, Rui Nuno Capela <rncbc@rncbc.org> and
is licensed under the GPL, see `/usr/share/common-licenses/GPL'.

View file

@ -1,2 +0,0 @@
debian/tmp/usr/bin/*
debian/tmp/usr/share/*

View file

@ -1,3 +0,0 @@
debian/tmp/usr/include/*
debian/tmp/usr/lib*/*.so
debian/tmp/usr/lib*/pkgconfig/*.pc

View file

@ -1 +0,0 @@
debian/tmp/usr/lib*/lib*.so.*

View file

@ -1,98 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatibility version to use.
#export DH_COMPAT=7
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
config.status: CMakeLists.txt
dh_testdir
# Add here commands to configure the package.
cmake -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR=/usr/lib .
build: build-stamp
build-stamp: config.status
dh_testdir
# Add here commands to compile the package.
$(MAKE)
# the build should fail if the tests are not successful
#$(MAKE) check
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
#-$(MAKE) distclean
dh_clean -a
install: build
dh_testdir
dh_testroot
dh_clean -k -a
dh_installdirs
# Add here commands to install the package into debian/tmp
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_install -a --list-missing
# dh_installchangelogs -a ChangeLog
# dh_installdocs -a
# dh_installexamples
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
# dh_installman
# dh_link
dh_strip -a
dh_compress -a
dh_fixperms -a
# dh_perl
# dh_python
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install

View file

View file

@ -1,8 +0,0 @@
Format: 1.0
Source: fluidsynth
Version: 2.2.0-1
Binary: fluidsynth, libfluidsynth1, libfluidsynth-dev
Maintainer: Rui Nuno Capela <rncbc@rncbc.org>
Architecture: any
Standards-Version: 3.7.2
Build-Depends: debhelper (>= 5.0.0), cmake, pkg-config, libdb-dev, libjack-dev, libasound2-dev, libsndfile-dev, libglib2.0-dev

View file

@ -1,142 +0,0 @@
#
# spec file for package fluidsynth
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# fix build for older distros and architectures where _fillupdir is
# not yet defined by using the old path as recommended by
# https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros#.25_fillupdir
%if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates
%endif
Name: fluidsynth
Version: 2.2.2
Release: 0
Summary: A Real-Time Software Synthesizer That Uses Soundfont(tm)
License: LGPL-2.1-or-later
Group: Productivity/Multimedia/Sound/Midi
Url: http://www.fluidsynth.org/
Source: https://github.com/FluidSynth/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1000: baselibs.conf
BuildRequires: cmake >= 3.1.0
BuildRequires: gcc-c++
%if 0%{?is_opensuse}
BuildRequires: ladspa-devel
%endif
BuildRequires: pkgconfig
BuildRequires: readline-devel
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(jack)
BuildRequires: pkgconfig(libinstpatch-1.0) >= 1.1.0
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(sndfile)
%if 0%{?suse_version}
%{?systemd_requires}
PreReq: %fillup_prereq
%endif
%description
FluidSynth (formerly IIWU Synth) is a real-time software synthesizer
based on the SoundFont(tm) 2 specifications. It can read MIDI events
from the MIDI input device and render them to the audio device. It
can also play MIDI files.
%package devel
Summary: Development package for the fluidsynth library
Group: Development/Libraries/C and C++
Requires: glibc-devel
Requires: libfluidsynth3 = %{version}
Provides: libfluidsynth-devel = %{version}
%description devel
This package contains the files needed to compile programs that use the
fluidsynth library.
%package -n libfluidsynth3
Summary: Library for Fluidsynth
Group: System/Libraries
%description -n libfluidsynth3
This package contains the shared library for Fluidsynth.
%prep
%setup -q
%build
%cmake \
-DFLUID_DAEMON_ENV_FILE=%{_fillupdir}/sysconfig.%{name} \
-Denable-lash=0
%cmake_build
%check
%cmake
%if 0%{?fedora_version} || 0%{?mageia}
%cmake_build --target check
%else
%cmake_build check
%endif
%install
%cmake_install
%if 0%{?suse_version}
# manually install systemd service files
install -Dm 644 build/fluidsynth.conf %{buildroot}%{_fillupdir}/sysconfig.%{name}
install -Dm 644 build/fluidsynth.service %{buildroot}%{_unitdir}/%{name}.service
install -d %{buildroot}%{_sbindir}
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
%pre
%service_add_pre %{name}.service
%post
%fillup_only
%service_add_post %{name}.service
%preun
%service_del_preun %{name}.service
%postun
%service_del_postun %{name}.service
%endif
%post -n libfluidsynth3 -p /sbin/ldconfig
%postun -n libfluidsynth3 -p /sbin/ldconfig
%files
%license LICENSE
%doc AUTHORS ChangeLog README.md THANKS TODO
%{_mandir}/man?/*
%{_bindir}/*
%if 0%{?suse_version}
%{_unitdir}/%{name}.service
%{_sbindir}/rc%{name}
%{_fillupdir}/sysconfig.%{name}
%endif
%files devel
%{_libdir}/lib*.so
%{_includedir}/*
%{_libdir}/pkgconfig/*.pc
%files -n libfluidsynth3
%{_libdir}/lib*.so.*
%changelog

76
fluidsynth.spec.in Normal file
View file

@ -0,0 +1,76 @@
%define name @PACKAGE@
%define version @VERSION@
%define release 1
%define prefix /usr
Summary: A real-time software synthesizer based on SoundFont 2 specifications.
Name: %{name}
Version: %{version}
Release: %{release}
Prefix: %{prefix}
Copyright: LGPL
Group: Sound
Source: https://savannah.nongnu.org/download/fluid/stable.pkg/%{version}/fluidsynth-%{version}.tar.gz
URL: https://www.fluidsynth.org/
BuildRoot: /var/tmp/%{name}-%{version}
%description
FluidSynth is a real-time software synthesizer based on the SoundFont
2 specifications. FluidSynth can read MIDI events from MIDI input
devices and render them to audio devices using SoundFont files to
define the instrument sounds. It can also play MIDI files and supports
real time effect control via SoundFont modulators and MIDI
controls. FluidSynth can be interfaced to other programs in different
ways, including linking as a shared library.
%package devel
Summary: Libraries and includes to build FluidSynth into other applications
Group: Development/Libraries
%description devel
FluidSynth is a real-time software synthesizer based on the SoundFont
2 specifications. FluidSynth can read MIDI events from MIDI input
devices and render them to audio devices using SoundFont files to
define the instrument sounds. It can also play MIDI files and supports
real time effect control via SoundFont modulators and MIDI
controls. FluidSynth can be interfaced to other programs in different
ways, including linking as a shared library.
This package contains libraries and includes for building applications
with FluidSynth support.
%prep
%setup
%build
./configure --prefix=%{prefix}
make
%install
if [ -d $RPM_BUILD_ROOT ]; then rm -rf $RPM_BUILD_ROOT; fi
mkdir -p $RPM_BUILD_ROOT
make prefix=$RPM_BUILD_ROOT%{prefix} install
%clean
if [ -d $RPM_BUILD_ROOT ]; then rm -rf $RPM_BUILD_ROOT; fi
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%{prefix}/bin/fluidsynth
%{prefix}/lib/libfluidsynth.so*
%{prefix}/man/man1/*
%files devel
%defattr(-,root,root)
%doc doc/example.c doc/example.sf2 doc/api doc/html/*
%{prefix}/lib/libfluidsynth.a
%{prefix}/lib/libfluidsynth.la
%{prefix}/lib/pkgconfig/fluidsynth.pc
%{prefix}/include/fluidsynth.h
%{prefix}/include/fluidsynth
%changelog
* Mon Aug 25 2003 Josh Green <jgreen@users.sourceforge.net>
- Created initial fluidsynth.spec.in

View file

@ -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)