mirror of https://github.com/AlexeyAB/darknet.git
upgrade FindCUDNN module to better deal with dlls and targets
This commit is contained in:
parent
73baf8531e
commit
09c996f8fb
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue