From 5d56ba0fcd05a467517d178ab168e110c3f59f6c Mon Sep 17 00:00:00 2001 From: Fabien Castan Date: Wed, 7 Dec 2022 08:45:55 +0000 Subject: [PATCH 1/3] [cmake] add find_dependency to zlib --- src/cmake/AliceVisionConfig.cmake.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cmake/AliceVisionConfig.cmake.in b/src/cmake/AliceVisionConfig.cmake.in index f86eedddd7..96ada7d6ba 100644 --- a/src/cmake/AliceVisionConfig.cmake.in +++ b/src/cmake/AliceVisionConfig.cmake.in @@ -108,6 +108,9 @@ if(ALICEVISION_BUILD_SFM) find_package(CoinUtils REQUIRED) find_package(Clp REQUIRED) find_package(Osi REQUIRED) +set(ALICEVISION_BUILD_MVS @ALICEVISION_BUILD_MVS@) +if(ALICEVISION_BUILD_MVS) + find_dependency(ZLIB REQUIRED) endif() # propagate other building options From 5da6cf54051d7744dae7085d50ca46cba8044598 Mon Sep 17 00:00:00 2001 From: Fabien Castan Date: Wed, 7 Dec 2022 08:46:17 +0000 Subject: [PATCH 2/3] [cmake] use find_dependency in config --- src/cmake/AliceVisionConfig.cmake.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cmake/AliceVisionConfig.cmake.in b/src/cmake/AliceVisionConfig.cmake.in index 96ada7d6ba..5106ab2bb6 100644 --- a/src/cmake/AliceVisionConfig.cmake.in +++ b/src/cmake/AliceVisionConfig.cmake.in @@ -105,9 +105,11 @@ 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) From a2d4ee85012bdf076aced13b57f8e3b8480e67ac Mon Sep 17 00:00:00 2001 From: Fabien Castan Date: Wed, 7 Dec 2022 15:07:44 +0100 Subject: [PATCH 3/3] [cmake] zlib dependency is already added as target so manually adding the include is a duplicate --- src/aliceVision/mvsData/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) 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} )