Skip to content
Tcl Source Code Artifact [bfa45ba598]
Login

Artifact [bfa45ba598]

Artifact bfa45ba598bc6d1031c8e5e6660c4d39fd9a4b2e8868e74a39af7ef5b06575ed:


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)