CMakeLists: Link in zlib privately where applicable

Also, use the target name introduced via find_package(ZLIB) instead
of hardcoding the 'z' name in the link libraries.
This commit is contained in:
Lioncash 2018-04-13 08:02:26 -04:00
commit b256f873ca
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
3 changed files with 7 additions and 1 deletions

View file

@ -77,3 +77,4 @@ set(ZLIB_SRCS
)
add_library(z STATIC ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
add_library(ZLIB::ZLIB ALIAS z)