From 2e16dd1a4659815bebe8414a4e9c6b09e1333268 Mon Sep 17 00:00:00 2001 From: Pedro Lopez-Cabanillas Date: Sat, 16 Oct 2010 18:27:29 +0000 Subject: [PATCH] fixed creation of the file "fluidsynth.pc", using the new *_INSTALL_DIR variables removed the deprecated macro "CreateLibtoolFile" (unused) renamed LT_VERSION_* variables as LIB_VERSION_* --- fluidsynth/CMakeLists.txt | 18 +++---- .../cmake_admin/CreateLibtoolFile.cmake | 48 ------------------- fluidsynth/cmake_admin/Makefile.am | 1 - fluidsynth/src/CMakeLists.txt | 10 ++-- 4 files changed, 14 insertions(+), 63 deletions(-) delete mode 100644 fluidsynth/cmake_admin/CreateLibtoolFile.cmake diff --git a/fluidsynth/CMakeLists.txt b/fluidsynth/CMakeLists.txt index a40e4042..3f8ee6c3 100644 --- a/fluidsynth/CMakeLists.txt +++ b/fluidsynth/CMakeLists.txt @@ -42,10 +42,11 @@ set ( FLUIDSYNTH_VERSION "\"${VERSION}\"" ) # if any interfaces have been added: AGE++ # if any interfaces have been removed/changed (compatibility broken): AGE=0 # This is not exactly the same algorithm as the libtool one, but the results are the same. -set ( LT_VERSION_CURRENT 1 ) -set ( LT_VERSION_AGE 4 ) -set ( LT_VERSION_REVISION 1 ) -set ( LT_VERSION_INFO "${LT_VERSION_CURRENT}.${LT_VERSION_AGE}.${LT_VERSION_REVISION}" ) +set ( LIB_VERSION_CURRENT 1 ) +set ( LIB_VERSION_AGE 4 ) +set ( LIB_VERSION_REVISION 1 ) +set ( LIB_VERSION_INFO + "${LIB_VERSION_CURRENT}.${LIB_VERSION_AGE}.${LIB_VERSION_REVISION}" ) # Options disabled by default option ( enable-floats "enable type float instead of double for DSP samples" off ) @@ -406,8 +407,8 @@ if ( UNIX ) # pkg-config support set ( prefix "${CMAKE_INSTALL_PREFIX}" ) set ( exec_prefix "\${prefix}" ) - set ( libdir "\${exec_prefix}/lib${LIB_SUFFIX}" ) - set ( includedir "\${prefix}/include" ) + set ( libdir "\${exec_prefix}/${LIB_INSTALL_DIR}${LIB_SUFFIX}" ) + set ( includedir "\${prefix}/${INCLUDE_INSTALL_DIR}" ) configure_file ( fluidsynth.pc.in ${CMAKE_BINARY_DIR}/fluidsynth.pc IMMEDIATE @ONLY ) install ( FILES ${CMAKE_BINARY_DIR}/fluidsynth.pc @@ -415,10 +416,9 @@ if ( UNIX ) # uninstall custom target configure_file ( "${CMAKE_SOURCE_DIR}/cmake_admin/cmake_uninstall.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" - IMMEDIATE @ONLY) + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) add_custom_target ( uninstall - "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") + "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") # tarball custom target add_custom_target ( tarball diff --git a/fluidsynth/cmake_admin/CreateLibtoolFile.cmake b/fluidsynth/cmake_admin/CreateLibtoolFile.cmake deleted file mode 100644 index c6e965c5..00000000 --- a/fluidsynth/cmake_admin/CreateLibtoolFile.cmake +++ /dev/null @@ -1,48 +0,0 @@ -# origin: http://www.cmake.org/Wiki/CMakeMacroLibtoolFile - -MACRO(GET_TARGET_PROPERTY_WITH_DEFAULT _variable _target _property _default_value) - GET_TARGET_PROPERTY (${_variable} ${_target} ${_property}) - IF (${_variable} MATCHES ".*NOTFOUND$") - SET (${_variable} ${_default_value}) - ENDIF (${_variable} MATCHES ".*NOTFOUND$") -ENDMACRO (GET_TARGET_PROPERTY_WITH_DEFAULT) - -MACRO(CREATE_LIBTOOL_FILE _target _install_DIR) - GET_TARGET_PROPERTY(_target_location ${_target} LOCATION) - GET_TARGET_PROPERTY_WITH_DEFAULT(_target_static_lib ${_target} STATIC_LIB "") - GET_TARGET_PROPERTY_WITH_DEFAULT(_target_dependency_libs ${_target} LT_DEPENDENCY_LIBS "") - GET_TARGET_PROPERTY_WITH_DEFAULT(_target_current ${_target} LT_VERSION_CURRENT 0) - GET_TARGET_PROPERTY_WITH_DEFAULT(_target_age ${_target} LT_VERSION_AGE 0) - GET_TARGET_PROPERTY_WITH_DEFAULT(_target_revision ${_target} LT_VERSION_REVISION 0) - GET_TARGET_PROPERTY_WITH_DEFAULT(_target_installed ${_target} LT_INSTALLED yes) - GET_TARGET_PROPERTY_WITH_DEFAULT(_target_shouldnotlink ${_target} LT_SHOULDNOTLINK yes) - GET_TARGET_PROPERTY_WITH_DEFAULT(_target_dlopen ${_target} LT_DLOPEN "") - GET_TARGET_PROPERTY_WITH_DEFAULT(_target_dlpreopen ${_target} LT_DLPREOPEN "") - GET_FILENAME_COMPONENT(_laname ${_target_location} NAME_WE) - GET_FILENAME_COMPONENT(_soname ${_target_location} NAME) - SET(_laname ${_laname}.la) - SET(_laname_file "${CMAKE_CURRENT_BINARY_DIR}/${_laname}") - FILE(WRITE ${_laname_file} "# ${_laname} - a libtool library file, generated by cmake \n") - FILE(APPEND ${_laname_file} "# The name that we can dlopen(3).\n") - FILE(APPEND ${_laname_file} "dlname='${_soname}'\n") - FILE(APPEND ${_laname_file} "# Names of this library\n") - FILE(APPEND ${_laname_file} "library_names='${_soname}.${_target_current}.${_target_age}.${_target_revision} ${_soname}.${_target_current} ${_soname}'\n") - FILE(APPEND ${_laname_file} "# The name of the static archive\n") - FILE(APPEND ${_laname_file} "old_library='${_target_static_lib}'\n") - FILE(APPEND ${_laname_file} "# Libraries that this one depends upon.\n") - FILE(APPEND ${_laname_file} "dependency_libs='${_target_dependency_libs}'\n") - FILE(APPEND ${_laname_file} "# Version information.\n") - FILE(APPEND ${_laname_file} "current=${_target_current}\n") - FILE(APPEND ${_laname_file} "age=${_target_age}\n") - FILE(APPEND ${_laname_file} "revision=${_target_revision}\n") - FILE(APPEND ${_laname_file} "# Is this an already installed library?\n") - FILE(APPEND ${_laname_file} "installed=${_target_installed}\n") - FILE(APPEND ${_laname_file} "# Should we warn about portability when linking against -modules?\n") - FILE(APPEND ${_laname_file} "shouldnotlink=${_target_shouldnotlink}\n") - FILE(APPEND ${_laname_file} "# Files to dlopen/dlpreopen\n") - FILE(APPEND ${_laname_file} "dlopen='${_target_dlopen}'\n") - FILE(APPEND ${_laname_file} "dlpreopen='${_target_dlpreopen}'\n") - FILE(APPEND ${_laname_file} "# Directory that this library needs to be installed in:\n") - FILE(APPEND ${_laname_file} "libdir='${CMAKE_INSTALL_PREFIX}/${_install_DIR}'\n") - INSTALL(FILES ${_laname_file} DESTINATION ${_install_DIR}) -ENDMACRO(CREATE_LIBTOOL_FILE) diff --git a/fluidsynth/cmake_admin/Makefile.am b/fluidsynth/cmake_admin/Makefile.am index 167adeed..827ab45b 100644 --- a/fluidsynth/cmake_admin/Makefile.am +++ b/fluidsynth/cmake_admin/Makefile.am @@ -4,7 +4,6 @@ EXTRA_DIST = CheckDIRSymbolExists.cmake \ CheckPrototypeExists.cmake \ CheckSTDC.cmake \ cmake_uninstall.cmake.in \ - CreateLibtoolFile.cmake \ DefaultDirs.cmake \ FindMidiShare.cmake \ FindOSS.cmake \ diff --git a/fluidsynth/src/CMakeLists.txt b/fluidsynth/src/CMakeLists.txt index c5dfe29f..4e2b238d 100644 --- a/fluidsynth/src/CMakeLists.txt +++ b/fluidsynth/src/CMakeLists.txt @@ -251,18 +251,18 @@ if ( MACOSX_FRAMEWORK ) OUTPUT_NAME "FluidSynth" FRAMEWORK TRUE PUBLIC_HEADER "${public_main_HEADER}" - FRAMEWORK_VERSION "${LT_VERSION_CURRENT}" + FRAMEWORK_VERSION "${LIB_VERSION_CURRENT}" INSTALL_NAME_DIR ${FRAMEWORK_INSTALL_DIR} - VERSION ${LT_VERSION_INFO} - SOVERSION ${LT_VERSION_CURRENT} + VERSION ${LIB_VERSION_INFO} + SOVERSION ${LIB_VERSION_CURRENT} ) else ( MACOSX_FRAMEWORK ) set_target_properties ( libfluidsynth PROPERTIES PREFIX "lib" OUTPUT_NAME "fluidsynth" - VERSION ${LT_VERSION_INFO} - SOVERSION ${LT_VERSION_CURRENT} + VERSION ${LIB_VERSION_INFO} + SOVERSION ${LIB_VERSION_CURRENT} ) endif ( MACOSX_FRAMEWORK )