]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Add public compile definition for zlib-ng API so that other projects that use CMake...
authorNathan Moinvaziri <nathan@nathanm.com>
Sun, 12 Jun 2022 16:01:15 +0000 (09:01 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 17 Jun 2022 09:56:57 +0000 (11:56 +0200)
CMakeLists.txt

index 6a26d597cd62745ffb8679cd80361c9484a35e9e..07c7753776a1c5c8f2b43fd12235408b29c6d5b4 100644 (file)
@@ -1037,6 +1037,9 @@ else()
 endif()
 
 foreach(ZLIB_INSTALL_LIBRARY ${ZLIB_INSTALL_LIBRARIES})
+    if(NOT ZLIB_COMPAT)
+        target_compile_definitions(${ZLIB_INSTALL_LIBRARY} PUBLIC ZLIBNG_NATIVE_API)
+    endif()
     target_include_directories(${ZLIB_INSTALL_LIBRARY} PUBLIC
         "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>"
         "$<INSTALL_INTERFACE:include>")