Debian Codegraph @

compat/zlib/contrib/iostream3/test/find_package_test.cmake.in

raw
1 cmake_minimum_required(VERSION 3.12...3.31)
2
3 project(
4 iostream_find_package
5 LANGUAGES CXX
6 VERSION @iostreamV3_VERSION@)
7
8 option(ZLIB_IOSTREAM_BUILD_SHARED "" @ZLIB_IOSTREAM_BUILD_SHARED@)
9 option(ZLIB_IOSTREAM_BUILD_STATIC "" @ZLIB_IOSTREAM_BUILD_STATIC@)
10
11 set(IOSTREAM_SRCS
12 @iostreamV3_SOURCE_DIR@/test.cc)
13
14 if(ZLIB_IOSTREAM_BUILD_SHARED)
15 find_package(iostreamv3 REQUIRED COMPONENTS shared CONFIG)
16 add_executable(test_example ${IOSTREAM_SRCS})
17 target_link_libraries(test_example IOSTREAMV3::IOSTREAMV3)
18 endif(ZLIB_IOSTREAM_BUILD_SHARED)
19
20 if(ZLIB_IOSTREAM_BUILD_STATIC)
21 find_package(iostreamv3 REQUIRED COMPONENTS static CONFIG)
22 add_executable(test_example_static ${IOSTREAM_SRCS})
23 target_link_libraries(test_example_static IOSTREAMV3::IOSTREAMV3STATIC)
24 endif(ZLIB_IOSTREAM_BUILD_STATIC)