Skip to content

Commit

Permalink
Make FindZLIB consistent with official definitions (facebook#4823)
Browse files Browse the repository at this point in the history
Summary:
CMake 3 already has FindZLIB.
[https://cmake.org/cmake/help/v3.13/module/FindZLIB.html](https://cmake.org/cmake/help/v3.13/module/FindZLIB.html)
Pull Request resolved: facebook#4823

Differential Revision: D13567653

Pulled By: ajkr

fbshipit-source-id: e424aac1e5d9af4ee0d293896faedf7c712f7734
  • Loading branch information
xkszltl authored and facebook-github-bot committed Jan 2, 2019
1 parent b9d6ecc commit e8210e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,13 @@ else()
if(WITH_ZLIB)
find_package(zlib REQUIRED)
add_definitions(-DZLIB)
include_directories(${ZLIB_INCLUDE_DIR})
if(ZLIB_INCLUDE_DIRS)
# CMake 3
include_directories(${ZLIB_INCLUDE_DIRS})
else()
# CMake 2
include_directories(${ZLIB_INCLUDE_DIR})
endif()
list(APPEND THIRDPARTY_LIBS ${ZLIB_LIBRARIES})
endif()

Expand Down
21 changes: 0 additions & 21 deletions cmake/modules/Findzlib.cmake

This file was deleted.

0 comments on commit e8210e4

Please sign in to comment.