From b6b41a65765e12cf6038026bfb5c38bc2771edeb Mon Sep 17 00:00:00 2001 From: Miku AuahDark Date: Thu, 25 Aug 2022 19:21:20 +0800 Subject: [PATCH] Re-apply Megasource-specific CMake patches to zlib. --- libs/zlib-1.2.12/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/zlib-1.2.12/CMakeLists.txt b/libs/zlib-1.2.12/CMakeLists.txt index e6fbb37d..1e0a61dc 100644 --- a/libs/zlib-1.2.12/CMakeLists.txt +++ b/libs/zlib-1.2.12/CMakeLists.txt @@ -187,6 +187,10 @@ add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) set_target_properties(zlib PROPERTIES SOVERSION 1) +target_include_directories(zlib PUBLIC .) +target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) +target_include_directories(zlibstatic PUBLIC .) +target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) if(NOT CYGWIN) # This property causes shared libraries on Linux to have the full version @@ -230,6 +234,8 @@ endif() # Example binaries #============================================================================ +return() + add_executable(example test/example.c) target_link_libraries(example zlib) add_test(example example)