diff --git a/src/aliceVision/mvsData/CMakeLists.txt b/src/aliceVision/mvsData/CMakeLists.txt index 676094c73f..8334045e6d 100644 --- a/src/aliceVision/mvsData/CMakeLists.txt +++ b/src/aliceVision/mvsData/CMakeLists.txt @@ -39,6 +39,4 @@ alicevision_add_library(aliceVision_mvsData Boost::boost OpenImageIO::OpenImageIO OpenImageIO::OpenImageIO_Util - PUBLIC_INCLUDE_DIRS - ${ZLIB_INCLUDE_DIR} ) diff --git a/src/cmake/AliceVisionConfig.cmake.in b/src/cmake/AliceVisionConfig.cmake.in index f86eedddd7..5106ab2bb6 100644 --- a/src/cmake/AliceVisionConfig.cmake.in +++ b/src/cmake/AliceVisionConfig.cmake.in @@ -105,9 +105,14 @@ endif() set(ALICEVISION_BUILD_SFM @ALICEVISION_BUILD_SFM@) if(ALICEVISION_BUILD_SFM) - find_package(CoinUtils REQUIRED) - find_package(Clp REQUIRED) - find_package(Osi REQUIRED) + find_dependency(CoinUtils REQUIRED) + find_dependency(Clp REQUIRED) + find_dependency(Osi REQUIRED) +endif() + +set(ALICEVISION_BUILD_MVS @ALICEVISION_BUILD_MVS@) +if(ALICEVISION_BUILD_MVS) + find_dependency(ZLIB REQUIRED) endif() # propagate other building options