Home | History | Annotate | Line # | Download | only in test
      1  1.1  christos cmake_minimum_required(VERSION 3.12...3.31)
      2  1.1  christos 
      3  1.1  christos project(
      4  1.1  christos     puff_find_package
      5  1.1  christos     LANGUAGES C
      6  1.1  christos     VERSION @puff_VERSION@)
      7  1.1  christos 
      8  1.1  christos option(ZLIB_PUFF_BUILD_SHARED "" @ZLIB_PUFF_BUILD_SHARED@)
      9  1.1  christos option(ZLIB_PUFF_BUILD_STATIC "" @ZLIB_PUFF_BUILD_STATIC@)
     10  1.1  christos 
     11  1.1  christos set(PUFF_SRCS
     12  1.1  christos     @puff_SOURCE_DIR@/pufftest.c)
     13  1.1  christos 
     14  1.1  christos if(ZLIB_PUFF_BUILD_SHARED)
     15  1.1  christos     find_package(puff REQUIRED COMPONENTS shared CONFIG)
     16  1.1  christos     add_executable(test_example ${PUFF_SRCS})
     17  1.1  christos     target_link_libraries(test_example PUFF::PUFF)
     18  1.1  christos endif(ZLIB_PUFF_BUILD_SHARED)
     19  1.1  christos 
     20  1.1  christos if(ZLIB_PUFF_BUILD_STATIC)
     21  1.1  christos     find_package(puff REQUIRED COMPONENTS static CONFIG)
     22  1.1  christos     add_executable(test_example_static ${PUFF_SRCS})
     23  1.1  christos     target_link_libraries(test_example_static PUFF::PUFFSTATIC)
     24  1.1  christos endif(ZLIB_PUFF_BUILD_STATIC)
     25