We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3e7390 commit 8fb32c0Copy full SHA for 8fb32c0
CMakeLists.txt
@@ -681,9 +681,14 @@ if(ENABLE_STATIC)
681
endif()
682
683
if(PNG_SUPPORTED)
684
+ if (APPLE)
685
+ find_package(ZLIB REQUIRED) # macos doesn't have static zlib
686
+ endif()
687
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
688
find_package(PNG 1.6 REQUIRED)
- find_package(ZLIB REQUIRED)
689
+ if (NOT APPLE)
690
+ find_package(ZLIB REQUIRED)
691
692
target_include_directories(cjpeg-static PUBLIC ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
693
target_link_libraries(cjpeg-static ${PNG_LIBRARY} ${ZLIB_LIBRARY})
694
0 commit comments