From 260339ac930bda43f0379da313ba60d64ecd61ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Pinard?= Date: Wed, 30 Dec 2020 17:32:09 +0100 Subject: [PATCH] include colmap_cuda in COLMAP_LIBRARIES when compiled with cuda fixes #1065 As discussed there, the example given in https://colmap.github.io/install.html#library does not work if colmap was compiled with cuda support because it doesnt link against the cuda_colmap library, even if the cuda functions are not used. This PR tries tries to fix the problem by adding colmap_cuda to the COLMAP_LIBRARIES variable so that the end user does not have to worry about it. --- cmake/CMakeConfig.cmake.in | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/CMakeConfig.cmake.in b/cmake/CMakeConfig.cmake.in index ff0aaae254..7be804a012 100644 --- a/cmake/CMakeConfig.cmake.in +++ b/cmake/CMakeConfig.cmake.in @@ -180,6 +180,7 @@ endif() if(COLMAP_CUDA_ENABLED) find_package(CUDA ${COLMAP_CUDA_MIN_VERSION} QUIET) list(APPEND COLMAP_EXTERNAL_LIBRARIES ${CUDA_LIBRARIES}) + list(APPEND COLMAP_INTERNAL_LIBRARIES colmap_cuda) endif() if(COLMAP_CGAL_ENABLED)