You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PackageKit-Qt/packagekit-qt-add-missing-c...

33 lines
1.4 KiB

diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt
index e643a71..0b84840 100755
--- a/src/modules/CMakeLists.txt
+++ b/src/modules/CMakeLists.txt
@@ -4,7 +4,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${LIBNAME}-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${LIBNAME}-config.cmake
@ONLY
)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/packagekit-qt-config-version.cmake.in
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${LIBNAME}-config-version.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${LIBNAME}-config-version.cmake
@ONLY
)
diff --git a/src/modules/packagekitqt4-config-version.cmake.in b/src/modules/packagekitqt4-config-version.cmake.in
new file mode 100644
index 0000000..860eb70
--- /dev/null
+++ b/src/modules/packagekitqt4-config-version.cmake.in
@@ -0,0 +1,13 @@
+SET(PACKAGE_VERSION @VERSION@)
+IF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
+ SET(PACKAGE_VERSION_EXACT "true")
+ENDIF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
+IF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
+ SET(PACKAGE_VERSION_COMPATIBLE "true")
+ELSE (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
+ SET(PACKAGE_VERSION_UNSUITABLE "true")
+ENDIF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
+IF (PACKAGE_VERSION_UNSUITABLE)
+ MESSAGE("VERSION CHECK FAILED FOR ${PACKAGE_FIND_NAME}. WANTED ${PACKAGE_FIND_VERSION}, HAVE ${PACKAGE_VERSION}")
+ENDIF(PACKAGE_VERSION_UNSUITABLE)
+