summaryrefslogtreecommitdiffstats
path: root/Tests/Module/FindDependency/packages
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Module/FindDependency/packages')
-rw-r--r--Tests/Module/FindDependency/packages/Pack1/Pack1Config.cmake9
-rw-r--r--Tests/Module/FindDependency/packages/Pack1/Pack1ConfigVersion.cmake11
-rw-r--r--Tests/Module/FindDependency/packages/Pack2/Pack2Config.cmake5
-rw-r--r--Tests/Module/FindDependency/packages/Pack2/Pack2ConfigVersion.cmake11
-rw-r--r--Tests/Module/FindDependency/packages/Pack3/Pack3Config.cmake5
-rw-r--r--Tests/Module/FindDependency/packages/Pack3/Pack3ConfigVersion.cmake11
6 files changed, 52 insertions, 0 deletions
diff --git a/Tests/Module/FindDependency/packages/Pack1/Pack1Config.cmake b/Tests/Module/FindDependency/packages/Pack1/Pack1Config.cmake
new file mode 100644
index 0000000..ff533c2
--- /dev/null
+++ b/Tests/Module/FindDependency/packages/Pack1/Pack1Config.cmake
@@ -0,0 +1,9 @@
+
+include(CMakeFindDependencyMacro)
+
+find_dependency(Pack2 2.3)
+find_dependency(Pack3)
+
+add_library(Pack1::Lib INTERFACE IMPORTED)
+set_property(TARGET Pack1::Lib PROPERTY INTERFACE_COMPILE_DEFINITIONS HAVE_PACK1)
+set_property(TARGET Pack1::Lib PROPERTY INTERFACE_LINK_LIBRARIES Pack2::Lib Pack3::Lib)
diff --git a/Tests/Module/FindDependency/packages/Pack1/Pack1ConfigVersion.cmake b/Tests/Module/FindDependency/packages/Pack1/Pack1ConfigVersion.cmake
new file mode 100644
index 0000000..dfb7b6c
--- /dev/null
+++ b/Tests/Module/FindDependency/packages/Pack1/Pack1ConfigVersion.cmake
@@ -0,0 +1,11 @@
+
+set(PACKAGE_VERSION "1.3")
+
+if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
+else()
+ set(PACKAGE_VERSION_COMPATIBLE TRUE)
+ if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
+ set(PACKAGE_VERSION_EXACT TRUE)
+ endif()
+endif()
diff --git a/Tests/Module/FindDependency/packages/Pack2/Pack2Config.cmake b/Tests/Module/FindDependency/packages/Pack2/Pack2Config.cmake
new file mode 100644
index 0000000..672288e
--- /dev/null
+++ b/Tests/Module/FindDependency/packages/Pack2/Pack2Config.cmake
@@ -0,0 +1,5 @@
+
+set(PACK2_VAR ON)
+
+add_library(Pack2::Lib INTERFACE IMPORTED)
+set_property(TARGET Pack2::Lib PROPERTY INTERFACE_COMPILE_DEFINITIONS HAVE_PACK2)
diff --git a/Tests/Module/FindDependency/packages/Pack2/Pack2ConfigVersion.cmake b/Tests/Module/FindDependency/packages/Pack2/Pack2ConfigVersion.cmake
new file mode 100644
index 0000000..42f58c0
--- /dev/null
+++ b/Tests/Module/FindDependency/packages/Pack2/Pack2ConfigVersion.cmake
@@ -0,0 +1,11 @@
+
+set(PACKAGE_VERSION "2.4")
+
+if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
+else()
+ set(PACKAGE_VERSION_COMPATIBLE TRUE)
+ if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
+ set(PACKAGE_VERSION_EXACT TRUE)
+ endif()
+endif()
diff --git a/Tests/Module/FindDependency/packages/Pack3/Pack3Config.cmake b/Tests/Module/FindDependency/packages/Pack3/Pack3Config.cmake
new file mode 100644
index 0000000..25c32f3
--- /dev/null
+++ b/Tests/Module/FindDependency/packages/Pack3/Pack3Config.cmake
@@ -0,0 +1,5 @@
+
+set(PACK3_VAR ON)
+
+add_library(Pack3::Lib INTERFACE IMPORTED)
+set_property(TARGET Pack3::Lib PROPERTY INTERFACE_COMPILE_DEFINITIONS HAVE_PACK3)
diff --git a/Tests/Module/FindDependency/packages/Pack3/Pack3ConfigVersion.cmake b/Tests/Module/FindDependency/packages/Pack3/Pack3ConfigVersion.cmake
new file mode 100644
index 0000000..870f747
--- /dev/null
+++ b/Tests/Module/FindDependency/packages/Pack3/Pack3ConfigVersion.cmake
@@ -0,0 +1,11 @@
+
+set(PACKAGE_VERSION "1.4")
+
+if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
+else()
+ set(PACKAGE_VERSION_COMPATIBLE TRUE)
+ if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
+ set(PACKAGE_VERSION_EXACT TRUE)
+ endif()
+endif()