diff --git a/CMakeLists.txt b/CMakeLists.txt index 195a37fc..5168bd9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -451,12 +451,9 @@ endif ( enable-readline ) # General configuration file configure_file ( ${CMAKE_SOURCE_DIR}/src/config.cmake ${CMAKE_BINARY_DIR}/config.h ) -configure_file ( ${CMAKE_SOURCE_DIR}/include/fluidsynth.cmake - ${CMAKE_BINARY_DIR}/include/fluidsynth.h ) # Process subdirectories add_subdirectory ( src ) -add_subdirectory ( include ) add_subdirectory ( doc ) # pkg-config support diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt deleted file mode 100644 index e64c853a..00000000 --- a/include/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -# FluidSynth - A Software Synthesize -# -# Copyright (C) 2003-2010 Peter Hanappe and others. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation; either version 2.1 of -# the License, or (at your option) any later version. -# -# This library 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 -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307, USA - -# CMake based build system. Pedro Lopez-Cabanillas - -add_subdirectory ( fluidsynth ) - -IF (NOT MACOSX_FRAMEWORK ) - install ( FILES fluidsynth.h DESTINATION ${INCLUDE_INSTALL_DIR} ) -ENDIF (NOT MACOSX_FRAMEWORK ) diff --git a/include/fluidsynth/CMakeLists.txt b/include/fluidsynth/CMakeLists.txt deleted file mode 100644 index 96282fba..00000000 --- a/include/fluidsynth/CMakeLists.txt +++ /dev/null @@ -1,52 +0,0 @@ -# FluidSynth - A Software Synthesize -# -# Copyright (C) 2003-2010 Peter Hanappe and others. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation; either version 2.1 of -# the License, or (at your option) any later version. -# -# This library 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 -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307, USA - -# CMake based build system. Pedro Lopez-Cabanillas - -configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/version.h.in - ${CMAKE_CURRENT_BINARY_DIR}/version.h ) - -if ( NOT MACOSX_FRAMEWORK ) - set ( include_HEADERS - audio.h - event.h - gen.h - ladspa.h - log.h - midi.h - misc.h - mod.h - ramsfont.h - seq.h - seqbind.h - settings.h - sfont.h - shell.h - synth.h - types.h - voice.h - ) - install ( - FILES - ${include_HEADERS} - ${CMAKE_CURRENT_BINARY_DIR}/version.h - DESTINATION - ${INCLUDE_INSTALL_DIR}/fluidsynth - ) -endif ( NOT MACOSX_FRAMEWORK ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cda7ff8f..35996691 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -204,6 +204,11 @@ set ( public_main_HEADER ${CMAKE_BINARY_DIR}/include/fluidsynth.h ) +configure_file ( ${CMAKE_SOURCE_DIR}/include/version.h.in + ${CMAKE_BINARY_DIR}/include/version.h ) +configure_file ( ${CMAKE_SOURCE_DIR}/include/fluidsynth.cmake + ${public_main_HEADER} ) + if ( WIN32 AND NOT MINGW ) include(generate_product_version) generate_product_version( @@ -280,6 +285,7 @@ if ( MACOSX_FRAMEWORK ) elseif ( OS2 ) set_target_properties ( libfluidsynth PROPERTIES + PUBLIC_HEADER "${public_HEADERS}" OUTPUT_NAME "fluidsynth" VERSION ${LIB_VERSION_INFO} SOVERSION ${LIB_VERSION_CURRENT} @@ -287,6 +293,7 @@ elseif ( OS2 ) elseif ( WIN32 ) set_target_properties ( libfluidsynth PROPERTIES + PUBLIC_HEADER "${public_HEADERS}" ARCHIVE_OUTPUT_NAME "fluidsynth" PREFIX "lib" OUTPUT_NAME "fluidsynth-${LIB_VERSION_CURRENT}" @@ -296,6 +303,7 @@ elseif ( WIN32 ) else ( MACOSX_FRAMEWORK ) set_target_properties ( libfluidsynth PROPERTIES + PUBLIC_HEADER "${public_HEADERS}" PREFIX "lib" OUTPUT_NAME "fluidsynth" VERSION ${LIB_VERSION_INFO} @@ -355,6 +363,8 @@ else ( MACOSX_FRAMEWORK ) RUNTIME DESTINATION ${BIN_INSTALL_DIR} LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR} + PUBLIC_HEADER DESTINATION ${INCLUDE_INSTALL_DIR}/fluidsynth ) + install ( FILES fluidsynth.h DESTINATION ${INCLUDE_INSTALL_DIR} ) endif ( MACOSX_FRAMEWORK )