Debian Codegraph @

src/thirdparty/SiftGPU/CMakeLists.txt

raw ◀ ▶
1 Debian patch touch this file
1 add_compile_definitions(SIFTGPU_NO_DEVIL)
2
3 if(SIMD_ENABLED AND IS_X86)
•4 if(MSVC)
5 set(SIFTGPU_USE_SSE_FOR TRUE)
6 else()
7 include(CheckCXXSourceCompiles)
8 check_cxx_source_compiles("
9 #ifndef __SSE__
10 #error SSE is not enabled for this compiler target.
11 #endif
12 #include <xmmintrin.h>
13 int main() {
14 __m128 value = _mm_setzero_ps();
15 return static_cast<int>(_mm_cvtss_f32(value));
16 }" SIFTGPU_HAS_TARGET_SSE)
17 set(SIFTGPU_USE_SSE_FOR ${SIFTGPU_HAS_TARGET_SSE})
18 endif()
19
20 if(SIFTGPU_USE_SSE_FOR)
21 add_compile_definitions(SIFTGPU_USE_SSE_FOR)
22 endif()
23 if(MSVC)
24 add_compile_definitions(__SSE__)
25 endif()
26 endif()
27
28 set(OPTIONAL_CUDA_SRCS)
29 set(OPTIONAL_CUDA_LINK_LIBS)
30 if(CUDA_ENABLED)
31 add_compile_definitions(SIFTGPU_CUDA_ENABLED)
32 set(OPTIONAL_CUDA_SRCS
33 CuTexImage.h CuTexImage.cpp
34 ProgramCU.cu
35 ProgramCU.h
36 PyramidCU.h PyramidCU.cpp
37 SiftMatchCU.h SiftMatchCU.cpp)
38 set(OPTIONAL_CUDA_LINK_LIBS
39 CUDA::cudart
40 CUDA::curand
41 )
42 endif()
43
44 COLMAP_ADD_LIBRARY(
45 NAME colmap_sift_gpu
46 SRCS
47 FrameBufferObject.h FrameBufferObject.cpp
48 GlobalUtil.h GlobalUtil.cpp
49 GLTexImage.h GLTexImage.cpp
50 ProgramGLSL.h ProgramGLSL.cpp
51 ProgramGPU.h
52 PyramidGL.h PyramidGL.cpp
53 ShaderMan.h ShaderMan.cpp
54 SiftGPU.h SiftGPU.cpp
55 SiftMatch.h SiftMatch.cpp
56 SiftPyramid.h SiftPyramid.cpp
57 ${OPTIONAL_CUDA_SRCS}
58 PRIVATE_LINK_LIBS
59 OpenGL::GL
60 GLEW::GLEW
61 ${OPTIONAL_CUDA_LINK_LIBS}
62 )