mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2026-10-25 22:28:17 +08:00
Changes for building for aarch64, specifically jetson orin nano
This commit is contained in:
@@ -20,25 +20,29 @@ find_package(GLUT)
|
||||
# Source file
|
||||
if(${OpenGL_FOUND})
|
||||
if (${GLUT_FOUND})
|
||||
# Add target for simpleCUDA2GL
|
||||
add_executable(simpleCUDA2GL simpleCUDA2GL.cu main.cpp)
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||
message(STATUS "Will not build sample simpleCUDA2GL - not supported on aarch64")
|
||||
else()
|
||||
# Add target for simpleCUDA2GL
|
||||
add_executable(simpleCUDA2GL simpleCUDA2GL.cu main.cpp)
|
||||
|
||||
target_compile_options(simpleCUDA2GL PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
|
||||
target_compile_options(simpleCUDA2GL PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:--extended-lambda>)
|
||||
|
||||
target_compile_features(simpleCUDA2GL PRIVATE cxx_std_17 cuda_std_17)
|
||||
target_compile_features(simpleCUDA2GL PRIVATE cxx_std_17 cuda_std_17)
|
||||
|
||||
set_target_properties(simpleCUDA2GL PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
|
||||
|
||||
target_include_directories(simpleCUDA2GL PUBLIC
|
||||
${OPENGL_INCLUDE_DIR}
|
||||
${CUDAToolkit_INCLUDE_DIRS}
|
||||
${GLUT_INCLUDE_DIRS}
|
||||
)
|
||||
set_target_properties(simpleCUDA2GL PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
|
||||
|
||||
target_include_directories(simpleCUDA2GL PUBLIC
|
||||
${OPENGL_INCLUDE_DIR}
|
||||
${CUDAToolkit_INCLUDE_DIRS}
|
||||
${GLUT_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
target_link_libraries(simpleCUDA2GL
|
||||
${OPENGL_LIBRARIES}
|
||||
${GLUT_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "GLUT not found - will not build sample 'simpleCUDA2GL'")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user