Commit a33d779b authored by Nikita Sirgienko's avatar Nikita Sirgienko

Add first version of CantorConfig.cmake

parent 3553d43d
......@@ -89,6 +89,33 @@ add_subdirectory(doc)
add_subdirectory(src)
add_subdirectory(icons)
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/Cantor")
configure_package_config_file(
${CMAKE_CURRENT_SOURCE_DIR}/CantorConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/CantorConfig.cmake
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}/
#PATH_VARS INCLUDE_INSTALL_DIR SYSCONFIG_INSTALL_DIR
)
ecm_setup_version(${KDE_APPLICATIONS_VERSION}
VARIABLE_PREFIX CANTOR
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/cantor_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/CantorConfigVersion.cmake"
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/CantorConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/CantorConfigVersion.cmake
DESTINATION ${CMAKECONFIG_INSTALL_DIR}
COMPONENT Devel
)
install(EXPORT CantorTargets
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
FILE CantorTargets.cmake
NAMESPACE Cantor::
)
install(FILES org.kde.cantor.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
......
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/CantorTargets.cmake")
......@@ -74,12 +74,22 @@ target_link_libraries( cantorlibs
Qt5::Xml
)
set_target_properties( cantorlibs PROPERTIES VERSION ${KDE_APPLICATIONS_VERSION} SOVERSION 20)
set (CANTORLIBS_SOVERSION 20)
set_target_properties( cantorlibs PROPERTIES VERSION ${KDE_APPLICATIONS_VERSION} SOVERSION ${CANTORLIBS_SOVERSION})
ecm_setup_version(${KDE_APPLICATIONS_VERSION}
VARIABLE_PREFIX CANTOR
SOVERSION ${CANTORLIBS_SOVERSION}
VERSION_HEADER ${CMAKE_CURRENT_BINARY_DIR}/cantorlibs_version.h
)
install( TARGETS cantorlibs ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
install( TARGETS cantorlibs EXPORT CantorTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
install( FILES ${cantor_LIB_HDRS} ${CMAKE_CURRENT_BINARY_DIR}/cantor_export.h
install(
FILES
${cantor_LIB_HDRS}
${CMAKE_CURRENT_BINARY_DIR}/cantor_export.h
${CMAKE_CURRENT_BINARY_DIR}/cantorlibs_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR}/cantor
COMPONENT Devel
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment