diff options
author | Nathan Moinvaziri <nathan@nathanm.com> | 2022-06-12 09:01:15 -0700 |
---|---|---|
committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2023-03-17 21:27:56 +0100 |
commit | e9222b707c552054ea40bb7f34f2a3094da08932 (patch) | |
tree | 4351cdc6827ac225dba64215f1a3b93af2f9023a | |
parent | 5f94bc674eb931a477f48da55df56f3f51b706b2 (diff) |
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".
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ec471a..bf7944a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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>") |