mapcache icon indicating copy to clipboard operation
mapcache copied to clipboard

zlib is not added to the linker when png lib is used

Open szekerest opened this issue 11 years ago • 3 comments

To fix this issue we should replace

target_link_libraries(mapcache ${PNG_LIBRARY})

with

target_link_libraries(mapcache ${PNG_LIBRARIES})

szekerest avatar Aug 10 '14 21:08 szekerest

Given mapcache does not directly link to zlib, I'd prefer if this was done only for platforms which need to explicitely add zlib, i.e. use PNG_LIBRARIES on wondows but keep using PNG_LIBRARY on *nix.

tbonfort avatar Aug 11 '14 07:08 tbonfort

In my understanding this is the case when libpng is being built as a static lib so we might also add a switch for that (USE_STATIC_LIBPNG or something like this). Anyway mapserver is also using PNG_LIBRARIES in CMakeLists.txt without any problems.

szekerest avatar Aug 11 '14 07:08 szekerest

@szekerest thanks for the mention of the workaround "target_link_libraries(mapcache ${PNG_LIBRARIES})"

For the record, this issue still exists with MapCache 1.4.0

jmckenna avatar Jul 30 '15 15:07 jmckenna