Skip to content

Commit

Permalink
Fix super build (e.g. FetchContent) integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Jul 1, 2020
1 parent f9aef46 commit f796d57
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ if(APPLE)
endif(APPLE)

# ZLIB
find_package(ZLIB)
if(ZLIB_FOUND)
if(NOT TARGET ZLIB::ZLIB)
find_package(ZLIB)
endif()
if(ZLIB_FOUND OR TARGET ZLIB::ZLIB)
message("Use zlib")
set(HAVE_ZLIB_H "1" CACHE INTERNAL "Use zlib")
set(COIN_HAS_ZLIB "1" CACHE INTERNAL "Use zlib")
endif()
Expand All @@ -61,7 +64,9 @@ else()
endif()

# CoinUtils
find_package(CoinUtils REQUIRED CONFIG)
if(NOT TARGET Coin::CoinUtils)
find_package(CoinUtils REQUIRED CONFIG)
endif()

include(CheckEnv)
include(CTest)
Expand Down

0 comments on commit f796d57

Please sign in to comment.