Skip to content

Commit d4bf550

Browse files
committed
also link to CUDA::cufft_static in case of BUILD_SHARED_LIBS=OFF
1 parent b236c71 commit d4bf550

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

modules/cudaarithm/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@ if(ENABLE_CUDA_FIRST_CLASS_LANGUAGE)
1717
endif()
1818
endif()
1919
if(HAVE_CUFFT)
20-
# static version requires seperable compilation which is incompatible with opencv's current library structure
21-
list(APPEND optional_dependencies CUDA::cufft)
20+
if(BUILD_SHARED_LIBS)
21+
list(APPEND optional_dependencies CUDA::cufft)
22+
else()
23+
# static version requires seperable compilation which is incompatible with opencv's current library structure
24+
# the cufft_static_nocallback variant does not requires seperable compilation. callbacks are currently not used.
25+
list(APPEND optional_dependencies CUDA::cufft_static_nocallback)
26+
endif()
2227
endif()
2328
else()
2429
if(HAVE_CUBLAS)

0 commit comments

Comments
 (0)