From e13b498266d69d12883f36d35d284cd3dbfa53c1 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Tue, 23 Nov 2021 21:46:52 -0800 Subject: [PATCH] Fix zlib INTERFACE usage --- extern/zlib/CMakeLists.txt | 28 +++++++++++++++------------- extern/zlib/{ => include}/crc32.h | 0 extern/zlib/{ => include}/deflate.h | 0 extern/zlib/{ => include}/gzguts.h | 0 extern/zlib/{ => include}/inffast.h | 0 extern/zlib/{ => include}/inffixed.h | 0 extern/zlib/{ => include}/inflate.h | 0 extern/zlib/{ => include}/inftrees.h | 0 extern/zlib/{ => include}/trees.h | 0 extern/zlib/{ => include}/zconf.h | 0 extern/zlib/{ => include}/zlib.h | 0 extern/zlib/{ => include}/zutil.h | 0 12 files changed, 15 insertions(+), 13 deletions(-) rename extern/zlib/{ => include}/crc32.h (100%) rename extern/zlib/{ => include}/deflate.h (100%) rename extern/zlib/{ => include}/gzguts.h (100%) rename extern/zlib/{ => include}/inffast.h (100%) rename extern/zlib/{ => include}/inffixed.h (100%) rename extern/zlib/{ => include}/inflate.h (100%) rename extern/zlib/{ => include}/inftrees.h (100%) rename extern/zlib/{ => include}/trees.h (100%) rename extern/zlib/{ => include}/zconf.h (100%) rename extern/zlib/{ => include}/zlib.h (100%) rename extern/zlib/{ => include}/zutil.h (100%) diff --git a/extern/zlib/CMakeLists.txt b/extern/zlib/CMakeLists.txt index 83da17b..5a42cd3 100644 --- a/extern/zlib/CMakeLists.txt +++ b/extern/zlib/CMakeLists.txt @@ -23,24 +23,26 @@ else () trees.c uncompr.c zutil.c - crc32.h - deflate.h - gzguts.h - inffast.h - inffixed.h - inflate.h - inftrees.h - trees.h - zconf.h - zlib.h - zutil.h) + include/crc32.h + include/deflate.h + include/gzguts.h + include/inffast.h + include/inffixed.h + include/inflate.h + include/inftrees.h + include/trees.h + include/zconf.h + include/zlib.h + include/zutil.h) if (WIN32 AND NOT UNIX) - install(FILES zconf.h zlib.h DESTINATION include COMPONENT zlib) + install(FILES include/zconf.h include/zlib.h DESTINATION include COMPONENT zlib) install(TARGETS z DESTINATION lib COMPONENT zlib) else () target_compile_options(z PRIVATE -Wno-implicit-fallthrough) endif () - target_include_directories(z INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) + target_include_directories(z PUBLIC + $ + $) set(ZLIB_LIBRARIES z CACHE STRING "zlib libraries" FORCE) set(ATHENA_ZLIB YES CACHE BOOL "Using built-in zlib" FORCE) endif () diff --git a/extern/zlib/crc32.h b/extern/zlib/include/crc32.h similarity index 100% rename from extern/zlib/crc32.h rename to extern/zlib/include/crc32.h diff --git a/extern/zlib/deflate.h b/extern/zlib/include/deflate.h similarity index 100% rename from extern/zlib/deflate.h rename to extern/zlib/include/deflate.h diff --git a/extern/zlib/gzguts.h b/extern/zlib/include/gzguts.h similarity index 100% rename from extern/zlib/gzguts.h rename to extern/zlib/include/gzguts.h diff --git a/extern/zlib/inffast.h b/extern/zlib/include/inffast.h similarity index 100% rename from extern/zlib/inffast.h rename to extern/zlib/include/inffast.h diff --git a/extern/zlib/inffixed.h b/extern/zlib/include/inffixed.h similarity index 100% rename from extern/zlib/inffixed.h rename to extern/zlib/include/inffixed.h diff --git a/extern/zlib/inflate.h b/extern/zlib/include/inflate.h similarity index 100% rename from extern/zlib/inflate.h rename to extern/zlib/include/inflate.h diff --git a/extern/zlib/inftrees.h b/extern/zlib/include/inftrees.h similarity index 100% rename from extern/zlib/inftrees.h rename to extern/zlib/include/inftrees.h diff --git a/extern/zlib/trees.h b/extern/zlib/include/trees.h similarity index 100% rename from extern/zlib/trees.h rename to extern/zlib/include/trees.h diff --git a/extern/zlib/zconf.h b/extern/zlib/include/zconf.h similarity index 100% rename from extern/zlib/zconf.h rename to extern/zlib/include/zconf.h diff --git a/extern/zlib/zlib.h b/extern/zlib/include/zlib.h similarity index 100% rename from extern/zlib/zlib.h rename to extern/zlib/include/zlib.h diff --git a/extern/zlib/zutil.h b/extern/zlib/include/zutil.h similarity index 100% rename from extern/zlib/zutil.h rename to extern/zlib/include/zutil.h