summaryrefslogtreecommitdiff
path: root/compat/zlib/contrib/iostream3/test/find_package_test.cmake.in
diff options
context:
space:
mode:
authorcashmere <cashmere@autistici.org>2026-09-04 09:05:24 +0200
committercashmere <cashmere@autistici.org>2026-09-04 09:05:24 +0200
commit4f49b16079b27d7ce633619e4cddfdf2bffbc952 (patch)
treec296c1e7f3c3e2f6859c6d3a1b1b208779b89679 /compat/zlib/contrib/iostream3/test/find_package_test.cmake.in
downloadrelic-4f49b16079b27d7ce633619e4cddfdf2bffbc952.tar.gz
initial commitHEADmaster
Diffstat (limited to 'compat/zlib/contrib/iostream3/test/find_package_test.cmake.in')
-rw-r--r--compat/zlib/contrib/iostream3/test/find_package_test.cmake.in24
1 files changed, 24 insertions, 0 deletions
diff --git a/compat/zlib/contrib/iostream3/test/find_package_test.cmake.in b/compat/zlib/contrib/iostream3/test/find_package_test.cmake.in
new file mode 100644
index 0000000..9b66878
--- /dev/null
+++ b/compat/zlib/contrib/iostream3/test/find_package_test.cmake.in
@@ -0,0 +1,24 @@
+cmake_minimum_required(VERSION 3.12...3.31)
+
+project(
+ iostream_find_package
+ LANGUAGES CXX
+ VERSION @iostreamV3_VERSION@)
+
+option(ZLIB_IOSTREAM_BUILD_SHARED "" @ZLIB_IOSTREAM_BUILD_SHARED@)
+option(ZLIB_IOSTREAM_BUILD_STATIC "" @ZLIB_IOSTREAM_BUILD_STATIC@)
+
+set(IOSTREAM_SRCS
+ @iostreamV3_SOURCE_DIR@/test.cc)
+
+if(ZLIB_IOSTREAM_BUILD_SHARED)
+ find_package(iostreamv3 REQUIRED COMPONENTS shared CONFIG)
+ add_executable(test_example ${IOSTREAM_SRCS})
+ target_link_libraries(test_example IOSTREAMV3::IOSTREAMV3)
+endif(ZLIB_IOSTREAM_BUILD_SHARED)
+
+if(ZLIB_IOSTREAM_BUILD_STATIC)
+ find_package(iostreamv3 REQUIRED COMPONENTS static CONFIG)
+ add_executable(test_example_static ${IOSTREAM_SRCS})
+ target_link_libraries(test_example_static IOSTREAMV3::IOSTREAMV3STATIC)
+endif(ZLIB_IOSTREAM_BUILD_STATIC)