Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(cmake): make CV-CUDA buildable for Jetson #98

Open
wants to merge 1 commit into
base: release_v0.3.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
build(cmake): make CV-CUDA buildable for Jetson
- 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

Fixes CVCUDA-450

Signed-off-by: Janusz Lisiecki <[email protected]>
JanuszL committed Aug 9, 2023
commit 649ef15723129ddc46a983ca8f2c258d7aa63890
1 change: 1 addition & 0 deletions python/mod_cvcuda/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
@@ -79,6 +79,7 @@ target_link_libraries(nvcv_module_python
nvcv_python_common
CUDA::cudart_static
dlpack::dlpack
-lrt
)

add_library(pynvcv INTERFACE)
1 change: 1 addition & 0 deletions src/cvcuda/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ target_link_libraries(cvcuda
PUBLIC
CUDA::cudart_static
nvcv_types
-lrt
PRIVATE
nvcv_util
nvcv_util_symver
1 change: 1 addition & 0 deletions src/cvcuda/priv/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
@@ -81,4 +81,5 @@ target_link_libraries(cvcuda_legacy
nvcv_types
nvcv_util
cvcuda_headers
-lrt
)
3 changes: 2 additions & 1 deletion src/nvcv_types/priv/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -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
@@ -190,6 +190,7 @@ target_link_libraries(nvcv_util
nvcv_types_headers
CUDA::cudart_static
nvcv_util_compat
-lrt
)

target_compile_definitions(nvcv_util
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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