From: Nathan Moinvaziri Date: Sun, 12 Jun 2022 16:01:15 +0000 (-0700) Subject: Add public compile definition for zlib-ng API so that other projects that use CMake... X-Git-Tag: 2.1.0-beta1~218 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54ea2398bce7f072eff06aab3d3fed600eef0659;p=thirdparty%2Fzlib-ng.git Add public compile definition for zlib-ng API so that other projects that use CMake and link against the zlib project can easily determine whether or not to include "zlib-ng.h" or "zlib.h". --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a26d597c..07c775377 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 "$" "$")