mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
upgrade FindCUDNN module to better deal with dlls and targets
This commit is contained in:
@ -70,10 +70,11 @@ mark_as_advanced(CUDNN_LIBRARY CUDNN_INCLUDE_DIR)
|
||||
# Release libraries), we will set appropriate target properties for these.
|
||||
# 2. However, for most systems, we will only register the import location and
|
||||
# include directory.
|
||||
|
||||
# Look for dlls, for Release and Debug libraries.
|
||||
if(WIN32)
|
||||
string( REPLACE ".lib" ".dll" CUDNN_LIBRARY_DLL "${CUDNN_LIBRARY}" )
|
||||
set(CUDNN_DLL_DIR ${CUDNN_INCLUDE_DIR})
|
||||
list(TRANSFORM CUDNN_DLL_DIR APPEND "/../bin")
|
||||
message(STATUS "CUDNN_DLL_DIR: ${CUDNN_DLL_DIR}")
|
||||
find_file(CUDNN_LIBRARY_DLL NAMES cudnn64_7.dll PATHS ${CUDNN_DLL_DIR})
|
||||
endif()
|
||||
|
||||
if( CUDNN_FOUND AND NOT TARGET CuDNN::CuDNN )
|
||||
|
Reference in New Issue
Block a user