]> 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 Mar 2023 20:27:56 +0000 (21:27 +0100)
CMakeLists.txt

index 4ec471a1465266993737d943952d12dc5c5d54d2..bf7944ae062bb6965d2d295ad4c3e2ea2bac4b0d 100644 (file)
@@ -1009,6 +1009,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>")