summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am4
-rw-r--r--cmakeconfig/ElementaryConfigVersion.cmake.in11
-rw-r--r--configure.ac1
3 files changed, 15 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index d34fffb22..ef7abd36d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -75,7 +75,9 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = elementary.pc
cmakeconfigdir = $(prefix)/share/cmake/Modules
-cmakeconfig_DATA = cmakeconfig/ElementaryConfig.cmake
+cmakeconfig_DATA = \
+cmakeconfig/ElementaryConfig.cmake \
+cmakeconfig/ElementaryConfigVersion.cmake
.PHONY: doc screenshots
diff --git a/cmakeconfig/ElementaryConfigVersion.cmake.in b/cmakeconfig/ElementaryConfigVersion.cmake.in
new file mode 100644
index 000000000..f99fba11a
--- /dev/null
+++ b/cmakeconfig/ElementaryConfigVersion.cmake.in
@@ -0,0 +1,11 @@
+set(PACKAGE_VERSION "@VERSION@")
+
+# Check whether the requested PACKAGE_FIND_VERSION is compatible
+if ("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
+else ()
+ set(PACKAGE_VERSION_COMPATIBLE TRUE)
+ if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
+ set(PACKAGE_VERSION_EXACT TRUE)
+ endif ()
+endif ()
diff --git a/configure.ac b/configure.ac
index 494d0bf75..0bcff378a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -829,6 +829,7 @@ config/standard/Makefile
config/mobile/Makefile
$po_makefile_in
cmakeconfig/ElementaryConfig.cmake
+cmakeconfig/ElementaryConfigVersion.cmake
])
#####################################################################