summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Toscano <luigi.toscano@tiscali.it>2016-10-29 09:33:46 (GMT)
committerLuigi Toscano <luigi.toscano@tiscali.it>2016-10-29 15:08:10 (GMT)
commit9cf1978b47cf593618fb64c60c8b8e044ee45a35 (patch)
treea759866aec20b4d0694eda8dcc94d5d95cb8491a
parent6eb0209c7f4cc642923b3418645cf5b1aa0ea07f (diff)
Bump the so/version and allow co-installability
-rw-r--r--CMakeLists.txt14
-rw-r--r--lib/CMakeLists.txt2
2 files changed, 13 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec6b41a..ef68f35 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,12 +8,19 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_D
include(FeatureSummary)
include(GenerateExportHeader)
include(ECMOptionalAddSubdirectory)
+include(ECMSetupVersion)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
find_package(Qt5 5.4 CONFIG REQUIRED Core Gui)
+ecm_setup_version("2.0.0"
+ VARIABLE_PREFIX QMOBIPOCKET
+ PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/QMobipocketConfigVersion.cmake"
+ SOVERSION "2"
+)
+
add_subdirectory(lib)
ecm_optional_add_subdirectory(thumbnailers)
@@ -27,8 +34,11 @@ if(STRIGI_STREAMS_LIBRARY)
ecm_optional_add_subdirectory(strigi)
endif()
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/QMobipocketConfig.cmake
- DESTINATION ${LIB_INSTALL_DIR}/cmake/QMobipocket )
+install(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/QMobipocketConfig.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/QMobipocketConfigVersion.cmake
+ DESTINATION ${LIB_INSTALL_DIR}/cmake/QMobipocket
+)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 99fad71..f931667 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -21,4 +21,4 @@ install(FILES
)
install(TARGETS qmobipocket ${INSTALL_TARGETS_DEFAULT_ARGS})
-set_target_properties(qmobipocket PROPERTIES VERSION 1.0.0 SOVERSION 1 )
+set_target_properties(qmobipocket PROPERTIES VERSION ${QMOBIPOCKET_VERSION} SOVERSION ${QMOBIPOCKET_SOVERSION})