vcpkg/ports/darknet/fix_shared_static.patch

21 lines
608 B
Diff
Raw Normal View History

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.12)
+cmake_minimum_required(VERSION 3.17)
set(Darknet_MAJOR_VERSION 0)
set(Darknet_MINOR_VERSION 2)
@@ -77,6 +77,11 @@ if(CMAKE_CUDA_COMPILER AND ENABLE_CUDA)
else()
message(STATUS "Your setup supports half precision (it requires CC >= 7.0)")
endif()
+ endif()
+ if(BUILD_SHARED_LIBS)
+ set(CMAKE_CUDA_RUNTIME_LIBRARY "Shared")
+ else()
+ set(CMAKE_CUDA_RUNTIME_LIBRARY "Static")
endif()
else()
set(ENABLE_CUDA "FALSE" CACHE BOOL "Enable CUDA support" FORCE)