diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f9571b8f..b6508cf01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,6 +121,11 @@ if(USE_CUDA AND CMAKE_CUDA_COMPILER) set_target_properties(onnxruntime-genai PROPERTIES LINKER_LANGUAGE CUDA) set_target_properties(python PROPERTIES LINKER_LANGUAGE CUDA) set_target_properties(Tests PROPERTIES LINKER_LANGUAGE CUDA) + message(STATUS "Adding CUDA libraries") + message(STATUS "CMAKE_CUDA_LIBRARIES: ${CMAKE_CUDA_LIBRARIES}") + target_link_libraries(onnxruntime-genai PRIVATE ${CMAKE_CUDA_LIBRARIES}) + target_link_libraries(Tests PRIVATE ${CMAKE_CUDA_LIBRARIES}) + target_link_libraries(python PRIVATE ${CMAKE_CUDA_LIBRARIES}) endif()