Skip to content

Commit

Permalink
Make CV-CUDA buildable for Jetson
Browse files Browse the repository at this point in the history
- libcudart on Jetson (CUDA 11.8) requires shm_open symbol which
  is provided by librt, without it linker complains about a missing
  symbol. This PR makes sure that whenever libcudart is linked -lrt
  linker flag is added as well

Signed-off-by: Janusz Lisiecki <[email protected]>
  • Loading branch information
JanuszL committed Aug 3, 2023
1 parent e4f97ee commit 333ab8d
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/mod_cvcuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ target_link_libraries(cvcuda_module_python
nvcv_util_compat
cvcuda
nvcv_python_common
-lrt
)

set_target_properties(cvcuda_module_python PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/python)
1 change: 1 addition & 0 deletions python/mod_nvcv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ target_link_libraries(nvcv_module_python
nvcv_python_common
CUDA::cudart_static
dlpack::dlpack
-lrt
)

add_library(pynvcv INTERFACE)
Expand Down
1 change: 1 addition & 0 deletions src/cvcuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ target_link_libraries(cvcuda
PUBLIC
CUDA::cudart_static
nvcv_types
-lrt
PRIVATE
nvcv_util
nvcv_util_symver
Expand Down
1 change: 1 addition & 0 deletions src/cvcuda/priv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,5 @@ target_link_libraries(cvcuda_priv
nvcv_util_sanitizer
cvcuda_legacy
CUDA::cudart_static
-lrt
)
1 change: 1 addition & 0 deletions src/cvcuda/priv/legacy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,5 @@ target_link_libraries(cvcuda_legacy
nvcv_types
nvcv_util
cvcuda_headers
-lrt
)
1 change: 1 addition & 0 deletions src/nvcv_types/priv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ target_link_libraries(nvcv_types_priv
nvcv_types_headers
nvcv_util_sanitizer
CUDA::cudart_static
-lrt
)
1 change: 1 addition & 0 deletions src/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ target_link_libraries(nvcv_util
nvcv_types_headers
CUDA::cudart_static
nvcv_util_compat
-lrt
)

target_compile_definitions(nvcv_util
Expand Down
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ target_link_libraries(nvcv_test_main
PRIVATE
nvcv_types
CUDA::cudart_static
-lrt
)

# Now we want to create a script in the output directory that will run
Expand Down

0 comments on commit 333ab8d

Please sign in to comment.