mirror of
https://github.com/status-im/snorenotify.git
synced 2025-01-09 16:15:45 +00:00
install version config for libsnore
This commit is contained in:
parent
6746c248c9
commit
490935302f
@ -17,7 +17,8 @@ include(KDECMakeSettings)
|
||||
|
||||
include(ECMAddAppIcon)
|
||||
include(ECMInstallIcons)
|
||||
|
||||
include(ECMSetupVersion)
|
||||
include(ECMPackageConfigHelpers)
|
||||
include(GenerateExportHeader)
|
||||
|
||||
|
||||
@ -30,7 +31,6 @@ option(WITH_SNORE_DAEMON "Build the Snore daemon, which redirects notifications"
|
||||
set(SNORE_VERSION_MAJOR 0)
|
||||
set(SNORE_VERSION_MINOR 5)
|
||||
set(SNORE_VERSION_PATCH 90)
|
||||
set(SNORE_VERSION_SUFFIX "")
|
||||
|
||||
set(SNORE_SUFFIX "-qt5")
|
||||
set(SNORE_CamelCase_SUFFIX "Qt5")
|
||||
|
@ -7,7 +7,6 @@ if(NOT SNORE_REVISION)
|
||||
endif()
|
||||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/version.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/version.cpp")
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/LibsnoreConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/Libsnore${SNORE_CamelCase_SUFFIX}Config.cmake" @ONLY)
|
||||
|
||||
QT5_ADD_RESOURCES(SNORENOTIFY_RCS ${SNORE_RCS})
|
||||
|
||||
@ -72,11 +71,25 @@ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
$<INSTALL_INTERFACE:include/snore/core>)
|
||||
|
||||
install(TARGETS libsnore EXPORT LibsnoreTarget ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
|
||||
install(EXPORT LibsnoreTarget DESTINATION ${KDE_INSTALL_CMAKEPACKAGEDIR}/libsnore${SNORE_CamelCase_SUFFIX} NAMESPACE Snore::)
|
||||
ecm_setup_version("${SNORE_VERSION_MAJOR}.${SNORE_VERSION_MINOR}.${SNORE_VERSION_PATCH}" VARIABLE_PREFIX SOLID
|
||||
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/Libsnore${SNORE_CamelCase_SUFFIX}ConfigVersion.cmake"
|
||||
SOVERSION ${SNORE_VERSION_MAJOR})
|
||||
|
||||
ecm_configure_package_config_file( "${CMAKE_CURRENT_SOURCE_DIR}/LibsnoreConfig.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Libsnore${SNORE_CamelCase_SUFFIX}Config.cmake"
|
||||
INSTALL_DESTINATION ${KDE_INSTALL_CMAKEPACKAGEDIR}/libsnore${SNORE_CamelCase_SUFFIX}
|
||||
)
|
||||
|
||||
install(TARGETS libsnore EXPORT Libsnore${SNORE_CamelCase_SUFFIX}Target ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
|
||||
install(EXPORT Libsnore${SNORE_CamelCase_SUFFIX}Target DESTINATION ${KDE_INSTALL_CMAKEPACKAGEDIR}/libsnore${SNORE_CamelCase_SUFFIX} NAMESPACE Snore::)
|
||||
|
||||
install(FILES ${SnoreNotify_HDR} DESTINATION ${KDE_INSTALL_INCLUDEDIR}/snore/core)
|
||||
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Libsnore${SNORE_CamelCase_SUFFIX}Config.cmake DESTINATION ${KDE_INSTALL_CMAKEPACKAGEDIR}/libsnore${SNORE_CamelCase_SUFFIX})
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Libsnore${SNORE_CamelCase_SUFFIX}Config.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Libsnore${SNORE_CamelCase_SUFFIX}ConfigVersion.cmake
|
||||
DESTINATION
|
||||
${KDE_INSTALL_CMAKEPACKAGEDIR}/libsnore${SNORE_CamelCase_SUFFIX})
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
find_package(Qt5Network REQUIRED)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/LibsnoreTarget.cmake")
|
||||
find_dependency(Qt5Core REQUIRED)
|
||||
find_dependency(Qt5Network REQUIRED)
|
||||
find_dependency(Qt5Widgets REQUIRED)
|
||||
find_dependency(Qt5Quick REQUIRED)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/Libsnore@SNORE_CamelCase_SUFFIX@Target.cmake")
|
||||
|
||||
set(LIBSNORE_FOUND TRUE)
|
||||
set(LIBSNORE_LIBRARIES Snore::Libsnore)
|
||||
|
@ -4,7 +4,7 @@ namespace Snore{
|
||||
|
||||
const QString Version::version()
|
||||
{
|
||||
return QLatin1String("${SNORE_VERSION_MAJOR}.${SNORE_VERSION_MINOR}.${SNORE_VERSION_PATCH}${SNORE_VERSION_SUFFIX}");
|
||||
return QLatin1String("${SNORE_VERSION_MAJOR}.${SNORE_VERSION_MINOR}.${SNORE_VERSION_PATCH}");
|
||||
}
|
||||
|
||||
const QString Version::major(){
|
||||
@ -19,11 +19,6 @@ const QString Version::patch(){
|
||||
return QLatin1String("${SNORE_VERSION_PATCH}");
|
||||
}
|
||||
|
||||
|
||||
const QString Version::suffix(){
|
||||
return QLatin1String("${SNORE_VERSION_SUFFIX}");
|
||||
}
|
||||
|
||||
const QString Version::revision(){
|
||||
return QLatin1String("${SNORE_REVISION}");
|
||||
}
|
||||
|
@ -41,12 +41,6 @@ public:
|
||||
*/
|
||||
static const QString patch();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return the suffix ("pre", "alpha", "beta", "")
|
||||
*/
|
||||
static const QString suffix();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return the git revision, can be empty in a release
|
||||
|
Loading…
x
Reference in New Issue
Block a user