CMake: fixed build without Python and Ceres if WITH_PYTHON and WITH_CERES are OFF (even if found by third party libraries, related to #783).

This commit is contained in:
matlabbe
2021-11-15 18:00:17 -05:00
parent 7af2a27e89
commit 9ae2c46546
2 changed files with 11 additions and 11 deletions

View File

@@ -195,7 +195,7 @@ IF(TORCH_FOUND)
)
ENDIF(TORCH_FOUND)
IF(Python3_FOUND)
IF(WITH_PYTHON AND Python3_FOUND)
SET(LIBRARIES
${LIBRARIES}
Python3::Python
@@ -422,7 +422,7 @@ IF(cvsba_FOUND)
)
ENDIF(cvsba_FOUND)
IF(CERES_FOUND)
IF(WITH_CERES AND CERES_FOUND)
SET(INCLUDE_DIRS
${INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
@@ -431,7 +431,7 @@ IF(CERES_FOUND)
${LIBRARIES}
${CERES_LIBRARIES}
)
ENDIF(CERES_FOUND)
ENDIF(WITH_CERES AND CERES_FOUND)
IF(libpointmatcher_FOUND)
SET(INCLUDE_DIRS