Commit 5144850c by Vicent Martí

Merge pull request #1660 from trast/tr/fix-zlib-configuration

CMakeLists: fix zlib linker setup
parents 84ba4944 c41281ad
...@@ -136,17 +136,15 @@ IF(WIN32 OR AMIGA) ...@@ -136,17 +136,15 @@ IF(WIN32 OR AMIGA)
ENDIF() ENDIF()
# Optional external dependency: zlib # Optional external dependency: zlib
IF(NOT ZLIB_LIBRARY) # It's optional, but FIND_PACKAGE gives a warning that looks more like an
# It's optional, but FIND_PACKAGE gives a warning that looks more like an # error.
# error. FIND_PACKAGE(ZLIB QUIET)
FIND_PACKAGE(ZLIB QUIET)
ENDIF()
IF (ZLIB_FOUND) IF (ZLIB_FOUND)
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS})
LINK_LIBRARIES(${ZLIB_LIBRARIES}) LINK_LIBRARIES(${ZLIB_LIBRARIES})
# Fake the message CMake would have shown # Fake the message CMake would have shown
MESSAGE("-- Found zlib: ${ZLIB_LIBRARY}") MESSAGE("-- Found zlib: ${ZLIB_LIBRARY}")
ELSEIF (NOT ZLIB_LIBRARY) ELSE()
MESSAGE( "zlib was not found; using bundled 3rd-party sources." ) MESSAGE( "zlib was not found; using bundled 3rd-party sources." )
INCLUDE_DIRECTORIES(deps/zlib) INCLUDE_DIRECTORIES(deps/zlib)
ADD_DEFINITIONS(-DNO_VIZ -DSTDC -DNO_GZIP) ADD_DEFINITIONS(-DNO_VIZ -DSTDC -DNO_GZIP)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment