I need to add a dependency in my project to minizip, which is part of zlib. I have the library on my system, so I can do
target_link_libraries (myproject /usr/lib64/libminizip.so)
but I cannot find out what is the portable way to do it. I can find and link zlib itself with no problems using
find_package(ZLIB REQUIRED)
but that does not link to the minizip library, as the ${ZLIB_LIBRARIES}
variable is set to /usr/lib64/libz.so
and I need /usr/lib64/libminizip.so
.