]> granicus.if.org Git - graphviz/commitdiff
CMake: fix: add Zlib include directories when building with Zlib
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 11 Nov 2022 16:30:12 +0000 (08:30 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 13 Nov 2022 22:02:46 +0000 (14:02 -0800)
This worked out before because everywhere we test has Zlib installed in the
default system paths. But technically this should be setup in order to correctly
use a Zlib installed somewhere else.

CHANGELOG.md
lib/gvc/CMakeLists.txt

index 8bd575510aaf2ce039479830f894606d99e36f35..b8a3dba8c51312cd188ee4df45528bed8ba3ad3a 100644 (file)
@@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - Gradient URL references in SVG output once again align with their targets
   (linear or radial gradients) when `id` attributes are in use. This was
   arguably a regression in Graphviz 6.0.1. #2307
+- The CMake build system’s interactions with a Zlib installed in a non-system
+  location has been improved.
 
 ## [7.0.1] – 2022-11-09
 
index b437bde8c8a734f401ef4b2ec7dc58a069b49610..90ba8b9015ef29e248a9a9b55f26bf9f9479d0ee 100644 (file)
@@ -72,6 +72,7 @@ if(LTDL_FOUND)
 endif()
 
 if(ZLIB_FOUND)
+  target_include_directories(gvc SYSTEM PRIVATE ${ZLIB_INCLUDE_DIRS})
   target_link_libraries(gvc PUBLIC ${ZLIB_LIBRARIES})
 endif()