diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e2a14358..67b2b7d98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,9 @@ project(libprojectM # functions. Adding new function should be okay if documented. set(PROJECTM_SO_VERSION "4") +# Base filename of all installed libraries. Also used as package name in pkgconfig. +set(PROJECTM_LIBRARY_BASE_OUTPUT_NAME "projectM-${PROJECT_VERSION_MAJOR}") + # The actual (full) library version of projectM set(PROJECTM_LIB_VERSION "${CMAKE_PROJECT_VERSION}") diff --git a/src/libprojectM/CMakeLists.txt b/src/libprojectM/CMakeLists.txt index 044bfa690..8225212c4 100644 --- a/src/libprojectM/CMakeLists.txt +++ b/src/libprojectM/CMakeLists.txt @@ -115,7 +115,7 @@ set_target_properties(projectM PROPERTIES VERSION "${PROJECTM_LIB_VERSION}" SOVERSION "${PROJECTM_SO_VERSION}" FOLDER libprojectM - OUTPUT_NAME projectM-4 + OUTPUT_NAME ${PROJECTM_LIBRARY_BASE_OUTPUT_NAME} ) if(BUILD_SHARED_LIBS) @@ -135,7 +135,7 @@ else() ) set_target_properties(projectM PROPERTIES - OUTPUT_NAME $,libprojectM-4,projectM-4> + OUTPUT_NAME $,lib${PROJECTM_LIBRARY_BASE_OUTPUT_NAME},${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}> FOLDER libprojectM ) endif() @@ -251,11 +251,11 @@ if(ENABLE_INSTALL) endforeach() endif() - set(PKGCONFIG_PACKAGE_NAME "projectM-4") + set(PKGCONFIG_PACKAGE_NAME "${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}") set(PKGCONFIG_PACKAGE_DESCRIPTION "projectM Music Visualizer") set(PKGCONFIG_PACKAGE_REQUIREMENTS_ALL "opengl") - generate_pkg_config_files(projectM projectM-4) + generate_pkg_config_files(projectM ${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}) endif() diff --git a/src/playlist/CMakeLists.txt b/src/playlist/CMakeLists.txt index b05a21446..55f2ad373 100644 --- a/src/playlist/CMakeLists.txt +++ b/src/playlist/CMakeLists.txt @@ -43,7 +43,7 @@ set_target_properties(projectM_playlist PROPERTIES SOVERSION "${PROJECTM_SO_VERSION}" EXPORT_NAME playlist FOLDER libprojectM - OUTPUT_NAME projectM-4-playlist + OUTPUT_NAME ${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}-playlist ) target_include_directories(projectM_playlist @@ -75,7 +75,7 @@ else() ) set_target_properties(projectM_playlist PROPERTIES - OUTPUT_NAME $,libprojectM-4-playlist,projectM-4-playlist> + OUTPUT_NAME $,lib${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}-playlist,${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}-playlist> FOLDER libprojectM ) endif() @@ -149,12 +149,12 @@ if(ENABLE_INSTALL) if(UNIX) include(GeneratePkgConfigFiles) - set(PKGCONFIG_PACKAGE_NAME "projectM-4-playlist") + set(PKGCONFIG_PACKAGE_NAME "${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}-playlist") set(PKGCONFIG_PACKAGE_DESCRIPTION "projectM Playlist Library") - set(PKGCONFIG_PACKAGE_REQUIREMENTS_RELEASE "projectM-4") - set(PKGCONFIG_PACKAGE_REQUIREMENTS_DEBUG "projectM-4-debug") + set(PKGCONFIG_PACKAGE_REQUIREMENTS_RELEASE "${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}") + set(PKGCONFIG_PACKAGE_REQUIREMENTS_DEBUG "${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}-debug") - generate_pkg_config_files(projectM_playlist projectM-4-playlist) + generate_pkg_config_files(projectM_playlist ${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}-playlist) endif() endif()