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     zlib_puff_add_subdirectory
      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_TESTING "" OFF)
      9  1.1  christos option(ZLIB_PUFF_BUILD_SHARED "" @ZLIB_PUFF_BUILD_SHARED@)
     10  1.1  christos option(ZLIB_PUFF_BUILD_STATIC "" @ZLIB_PUFF_BUILD_STATIC@)
     11  1.1  christos 
     12  1.1  christos add_subdirectory(@puff_SOURCE_DIR@ ${CMAKE_CURRENT_BINARY_DIR}/puff)
     13  1.1  christos 
     14  1.1  christos set(PUFF_SRCS
     15  1.1  christos     @puff_SOURCE_DIR@/pufftest.c)
     16  1.1  christos 
     17  1.1  christos if(ZLIB_PUFF_BUILD_SHARED)
     18  1.1  christos     add_executable(test_example ${PUFF_SRCS})
     19  1.1  christos     target_link_libraries(test_example PUFF::PUFF)
     20  1.1  christos endif(ZLIB_PUFF_BUILD_SHARED)
     21  1.1  christos 
     22  1.1  christos if(ZLIB_PUFF_BUILD_STATIC)
     23  1.1  christos     add_executable(test_example_static ${PUFF_SRCS})
     24  1.1  christos     target_link_libraries(test_example_static PUFF::PUFFSTATIC)
     25  1.1  christos endif(ZLIB_PUFF_BUILD_STATIC)
     26