2019-03-15 05:15:28 +08:00
vcpkg_from_github (
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
R E P O A l e x e y A B / d a r k n e t
2020-09-02 05:19:35 +08:00
R E F e c a d 7 7 0 0 7 1 e b 7 7 6 2 0 8 a 4 6 9 7 7 3 4 7 e 6 d 2 4 1 0 d 4 f 5 0 e
S H A 5 1 2 1 d e 0 d c 3 f 4 8 4 2 c 6 8 f 5 c 1 2 a d d f 1 0 0 9 9 6 f 7 1 7 6 f f b 5 0 d c d 8 9 a 0 b 5 7 4 4 6 b a 9 9 6 d 9 1 9 9 e 3 1 5 3 1 f 6 4 c 3 2 e e d b c 2 e a 6 a 4 4 9 4 5 9 5 7 3 8 1 1 4 4 4 d d 3 5 f 1 a 5 0 e c e 3 8 8 0 f 5 8 7 1 7 c 7 9 5 a b
2019-03-15 05:15:28 +08:00
H E A D _ R E F m a s t e r
2020-09-25 06:15:06 +08:00
P A T C H E S
0 0 0 1 - r e n a m e - _ c a s t u 3 2 _ f 3 2 - t o - g e m m _ c a s t u 3 2 _ f 3 2 . p a t c h
2019-03-15 05:15:28 +08:00
)
2019-09-25 03:58:38 +08:00
# enable CUDA inside DARKNET
set ( ENABLE_CUDA OFF )
if ( "cuda" IN_LIST FEATURES )
set ( ENABLE_CUDA ON )
endif ( )
set ( ENABLE_OPENCV OFF )
# enable OPENCV (basic version) inside DARKNET
if ( "opencv-base" IN_LIST FEATURES )
set ( ENABLE_OPENCV ON )
endif ( )
2020-05-07 06:26:16 +08:00
if ( "opencv2-base" IN_LIST FEATURES )
set ( ENABLE_OPENCV ON )
endif ( )
2019-09-25 03:58:38 +08:00
if ( "opencv3-base" IN_LIST FEATURES )
set ( ENABLE_OPENCV ON )
endif ( )
# enable OPENCV (with its own CUDA feature enabled) inside DARKNET
# (note: this does not mean that DARKNET itself will have CUDA support since by design it is independent, to have it you must require both opencv-cuda and cuda features!)
# DARKNET will be automatically able to distinguish an OpenCV that is built with or without CUDA support.
if ( "opencv-cuda" IN_LIST FEATURES )
set ( ENABLE_OPENCV ON )
endif ( )
2020-05-07 06:26:16 +08:00
if ( "opencv2-cuda" IN_LIST FEATURES )
set ( ENABLE_OPENCV ON )
endif ( )
2019-09-25 03:58:38 +08:00
if ( "opencv3-cuda" IN_LIST FEATURES )
set ( ENABLE_OPENCV ON )
endif ( )
# enable CUDNN inside DARKNET (which depends on the "cuda" feature by design)
set ( ENABLE_CUDNN OFF )
if ( "cudnn" IN_LIST FEATURES )
set ( ENABLE_CUDNN ON )
endif ( )
2019-03-15 05:15:28 +08:00
2019-08-14 11:13:55 +08:00
if ( "cuda" IN_LIST FEATURES )
2019-06-29 04:48:42 +08:00
if ( NOT VCPKG_CMAKE_SYSTEM_NAME AND NOT ENV{CUDACXX} )
#CMake looks for nvcc only in PATH and CUDACXX env vars for the Ninja generator. Since we filter path on vcpkg and CUDACXX env var is not set by CUDA installer on Windows, CMake cannot find CUDA when using Ninja generator, so we need to manually enlight it if necessary (https://gitlab.kitware.com/cmake/cmake/issues/19173). Otherwise we could just disable Ninja and use MSBuild, but unfortunately CUDA installer does not integrate with some distributions of MSBuild (like the ones inside Build Tools), making CUDA unavailable otherwise in those cases, which we want to avoid
set ( ENV{CUDACXX} "$ENV{CUDA_PATH}/bin/nvcc.exe" )
endif ( )
endif ( )
2019-03-15 05:15:28 +08:00
if ( "weights" IN_LIST FEATURES )
2020-08-08 07:10:58 +08:00
vcpkg_download_distfile ( YOLOV4-TINY_WEIGHTS
U R L S " h t t p s : / / g i t h u b . c o m / A l e x e y A B / d a r k n e t / r e l e a s e s / d o w n l o a d / d a r k n e t _ y o l o _ v 4 _ p r e / y o l o v 4 - t i n y . w e i g h t s "
F I L E N A M E " d a r k n e t - c a c h e / y o l o v 4 - t i n y . w e i g h t s "
S H A 5 1 2 8 0 4 c a 2 a b 8 e 3 6 9 9 d 3 1 c 9 5 b f 7 7 3 d 2 2 f 9 0 1 f 1 8 6 7 0 3 4 8 7 c 7 9 4 5 f 3 0 d c 2 d b b 8 0 8 0 9 4 7 9 3 3 6 2 c b 6 f 5 d a 5 c d 0 b 4 b 8 3 f 8 2 0 c 8 5 6 5 a 3 c b a 2 2 f a f a 0 6 9 e e 6 c a 2 a 9 2 5 6 7 7 1 3 7 d 9 5 f 4
)
vcpkg_download_distfile ( YOLOV4_WEIGHTS
U R L S " h t t p s : / / g i t h u b . c o m / A l e x e y A B / d a r k n e t / r e l e a s e s / d o w n l o a d / d a r k n e t _ y o l o _ v 3 _ o p t i m a l / y o l o v 4 . w e i g h t s "
F I L E N A M E " d a r k n e t - c a c h e / y o l o v 4 . w e i g h t s "
S H A 5 1 2 7 7 f 7 7 9 c 5 8 d f 6 7 9 7 5 b 1 8 7 c f e a d 9 9 c 1 e 6 2 d 7 2 c 5 7 e 7 6 c 3 7 1 5 e 3 5 b 9 7 a 1 c 7 a b a 1 c 7 b 0 9 2 b e 9 7 f f b 1 7 9 0 7 0 9 9 5 4 3 a c 3 9 5 7 0 8 5 a 0 f e 9 6 8 8 d f 4 a 6 5 3 e a 6 2 d f e 8 3 2 2 a f c a 5 3 e 4 0
)
vcpkg_download_distfile ( YOLOV3-TINY-PRN_WEIGHTS
U R L S " h t t p s : / / d r i v e . g o o g l e . c o m / u / 0 / u c ? i d = 1 8 y Y Z W y K b o 4 X S D V y z t m s E c F 9 B _ 6 b x r h U Y & e x p o r t = d o w n l o a d "
F I L E N A M E " d a r k n e t - c a c h e / y o l o v 3 - t i n y - p r n . w e i g h t s "
S H A 5 1 2 0 b e 2 6 7 8 6 1 0 3 8 6 6 8 6 8 7 5 1 b b 8 c 5 c c 0 b 5 1 4 7 b 3 e 8 5 2 8 d 0 c f 5 b 3 8 7 f 5 a e f c 7 2 8 0 7 f d 7 f 1 b f 8 0 4 9 d 5 b 0 a 4 7 e 9 b 4 4 4 5 d 3 4 e 7 7 3 e a 8 e 3 a b c 9 5 3 3 0 e d b 2 a 3 e c d 6 1 0 3 e 1 5 8 d f 2 6 7 7
)
2019-03-15 05:15:28 +08:00
vcpkg_download_distfile ( YOLOV3_WEIGHTS
U R L S " h t t p s : / / p j r e d d i e . c o m / m e d i a / f i l e s / y o l o v 3 . w e i g h t s "
F I L E N A M E " d a r k n e t - c a c h e / y o l o v 3 . w e i g h t s "
S H A 5 1 2 2 9 3 c 7 0 e 4 0 4 f f 0 2 5 0 d 7 c 0 4 c a 1 e 5 e 0 5 3 f c 2 1 a 7 8 5 4 7 e 6 9 b 5 b 3 2 9 d 3 4 f 2 5 9 8 1 6 1 3 e 5 9 b 9 8 2 d 9 3 f f f 2 c 3 5 2 9 1 5 e f 7 5 3 1 d 6 c 3 b 0 2 a 9 b 0 b 3 8 3 4 6 d 0 5 c 5 1 d 6 6 3 6 8 7 8 d 8 8 8 3 f 2 c 1
)
2020-08-08 07:10:58 +08:00
vcpkg_download_distfile ( YOLOV3-OPENIMAGES_WEIGHTS
U R L S " h t t p s : / / p j r e d d i e . c o m / m e d i a / f i l e s / y o l o v 3 - o p e n i m a g e s . w e i g h t s "
F I L E N A M E " d a r k n e t - c a c h e / y o l o v 3 - o p e n i m a g e s . w e i g h t s "
S H A 5 1 2 6 1 6 e 9 0 0 5 7 9 4 6 c 9 5 8 8 d 0 4 5 c f f 6 e c 3 6 b 6 3 2 5 4 6 6 0 a f 4 3 7 7 2 0 1 d c 0 2 6 4 2 e 7 9 8 d 6 2 f 3 9 2 e 8 f 3 c d b 5 b 1 0 a 1 c 4 b c b e 5 c 0 5 6 e 6 9 0 2 7 5 d c a 3 5 b 6 8 d b 7 f d 8 0 2 7 8 3 a 0 c 6 b b d 9 5 9 b a 8
)
2019-03-15 05:15:28 +08:00
vcpkg_download_distfile ( YOLOV2_WEIGHTS
U R L S " h t t p s : / / p j r e d d i e . c o m / m e d i a / f i l e s / y o l o v 2 . w e i g h t s "
F I L E N A M E " d a r k n e t - c a c h e / y o l o v 2 . w e i g h t s "
S H A 5 1 2 5 2 7 1 d a 2 d d 2 d a 9 1 5 1 7 2 d d d 0 3 4 c 8 e 8 9 4 8 7 7 e 7 0 6 6 0 5 1 f 1 0 5 a e 8 2 e 2 5 e 1 8 5 a 2 b 4 e 4 1 5 7 d 2 b 9 5 1 4 6 5 3 c 2 3 7 8 0 e 8 7 3 4 6 f 2 b 2 0 d f 6 3 6 3 0 1 8 b 7 e 6 8 8 a b a 4 2 2 e 2 d a c f 1 d 2 f b f 6 a b
)
vcpkg_download_distfile ( YOLOV3-TINY_WEIGHTS
U R L S " h t t p s : / / p j r e d d i e . c o m / m e d i a / f i l e s / y o l o v 3 - t i n y . w e i g h t s "
F I L E N A M E " d a r k n e t - c a c h e / y o l o v 3 - t i n y . w e i g h t s "
S H A 5 1 2 9 8 1 a 5 6 4 5 9 5 1 5 f 7 2 7 b b 7 b 3 d 3 3 4 1 b 9 5 f 4 1 1 7 4 9 9 b 6 7 2 6 e a b 2 7 9 8 e 1 c 3 e 5 2 4 d e 1 e e 8 e d 0 d 9 5 4 c 1 1 b 2 7 b b b b 9 2 6 d a 2 c c 9 5 5 5 2 6 a 1 9 4 e d d f 6 9 c 5 5 d 6 5 9 2 3 9 9 4 a b 2 e 8 a f 0 7 0 4 2
)
vcpkg_download_distfile ( YOLOV2-TINY_WEIGHTS
U R L S " h t t p s : / / p j r e d d i e . c o m / m e d i a / f i l e s / y o l o v 2 - t i n y . w e i g h t s "
F I L E N A M E " d a r k n e t - c a c h e / y o l o v 2 - t i n y . w e i g h t s "
S H A 5 1 2 f 0 8 5 7 a 7 a 0 2 c f 4 3 2 2 3 5 4 d 2 8 8 c 9 a f a 0 b 8 7 3 2 1 b 2 3 0 8 2 b 7 1 9 b c 8 4 e a 6 4 e 2 f 3 5 5 6 c c 1 f a f e b 8 3 6 e e 5 b f 9 f b 6 d c f 4 4 8 8 3 9 0 6 1 b 9 3 6 2 3 a 0 6 7 d f d e 7 a f a 1 3 3 8 6 3 6 8 6 5 e a 8 8 9 8 9 a
)
endif ( )
2019-07-30 02:14:39 +08:00
if ( "weights-train" IN_LIST FEATURES )
2020-08-08 07:10:58 +08:00
vcpkg_download_distfile ( YOLOV4-TINY-CONV-29
U R L S " h t t p s : / / g i t h u b . c o m / A l e x e y A B / d a r k n e t / r e l e a s e s / d o w n l o a d / d a r k n e t _ y o l o _ v 4 _ p r e / y o l o v 4 - t i n y . c o n v . 2 9 "
F I L E N A M E " d a r k n e t - c a c h e / y o l o v 4 - t i n y . c o n v . 2 9 "
S H A 5 1 2 3 1 8 e 4 7 f 4 b d f 4 3 b 7 f 4 e f f 8 f 3 6 6 9 b c 9 b a 6 6 c d 7 b d 8 f f b 3 1 d f 5 b c 1 9 7 8 6 8 2 c 8 5 f e c 8 e 6 3 a 8 3 4 9 9 5 8 0 2 2 f d 9 3 3 c c 6 7 6 c b f 5 2 4 1 9 5 3 f 2 1 8 1 b f 4 d 1 7 8 9 f 7 c f 9 d 3 7 1 e 0 1 2 e 3 e 4 9
)
vcpkg_download_distfile ( YOLOV4-CONV-137
U R L S " h t t p s : / / g i t h u b . c o m / A l e x e y A B / d a r k n e t / r e l e a s e s / d o w n l o a d / d a r k n e t _ y o l o _ v 3 _ o p t i m a l / y o l o v 4 . c o n v . 1 3 7 "
F I L E N A M E " d a r k n e t - c a c h e / y o l o v 4 . c o n v . 1 3 7 "
S H A 5 1 2 d 1 4 6 a 6 1 7 6 2 b f 6 e f 9 1 d e b 6 c 6 2 7 e d e 4 7 5 f 6 3 b 3 9 7 5 f b e e b 1 f f 5 e 0 9 4 9 4 7 0 b 2 9 b e 8 f c 2 8 e e 8 1 2 8 0 0 4 1 9 3 7 e 7 d e d 4 9 6 7 9 2 7 6 f b a b a c d b 9 2 d 0 2 f a 2 4 6 c c 6 2 2 8 5 3 6 3 3 f d 3 d 9 9 2
)
vcpkg_download_distfile ( DARKNET53-CONV-74
2019-07-30 02:14:39 +08:00
U R L S " h t t p s : / / p j r e d d i e . c o m / m e d i a / f i l e s / d a r k n e t 5 3 . c o n v . 7 4 "
F I L E N A M E " d a r k n e t - c a c h e / d a r k n e t 5 3 . c o n v . 7 4 "
S H A 5 1 2 8 9 8 3 e 1 c 1 2 9 e 2 d 6 e 8 e 3 d a 0 c c 0 7 8 1 e c b 7 a 0 7 8 1 3 8 3 0 e f 5 a 8 7 c 2 4 b 5 3 1 0 0 d f 6 a 5 f 2 3 d b 6 c 6 e 6 a 4 0 2 a e c 7 8 0 2 5 a 9 3 f e 0 6 0 b 7 5 d 1 9 5 8 f 1 b 8 f 7 4 3 9 a 0 4 b 5 4 a 3 f 1 9 c 8 1 e 2 a e 9 9 b
)
2020-08-08 07:10:58 +08:00
vcpkg_download_distfile ( DARKNET19-448-CONV-23
2019-07-30 02:14:39 +08:00
U R L S " h t t p s : / / p j r e d d i e . c o m / m e d i a / f i l e s / d a r k n e t 1 9 _ 4 4 8 . c o n v . 2 3 "
F I L E N A M E " d a r k n e t - c a c h e / d a r k n e t 1 9 _ 4 4 8 . c o n v . 2 3 "
S H A 5 1 2 8 0 1 6 f 5 b 7 d d c 1 5 c 5 d 7 d a d 2 3 1 5 9 2 f 5 3 5 1 e e a 6 5 f 6 0 8 e b d b 2 0 4 f 5 4 5 0 3 4 d d e 9 0 4 e 1 1 9 6 2 f 6 9 3 0 8 0 d f e b 5 a 4 5 1 0 e 7 b 7 1 b d d a 1 5 1 a 9 1 2 1 b a 0 f 8 a 2 4 3 0 1 8 d 6 8 0 f 0 1 b 1 e f d b d 3 1
)
endif ( )
#make sure we don't use any integrated pre-built library nor any unnecessary CMake module
2019-03-23 01:25:15 +08:00
file ( REMOVE_RECURSE ${ SOURCE_PATH } /3rdparty )
2019-07-30 02:14:39 +08:00
file ( REMOVE ${ SOURCE_PATH } /cmake/Modules/FindPThreads_windows.cmake )
2019-09-25 03:58:38 +08:00
file ( REMOVE ${ SOURCE_PATH } /cmake/Modules/FindCUDNN.cmake )
2019-10-09 20:35:24 +08:00
file ( REMOVE ${ SOURCE_PATH } /cmake/Modules/FindStb.cmake )
2019-03-15 05:15:28 +08:00
vcpkg_configure_cmake (
S O U R C E _ P A T H $ { S O U R C E _ P A T H }
2019-09-25 03:58:38 +08:00
D I S A B L E _ P A R A L L E L _ C O N F I G U R E
2019-06-29 04:48:42 +08:00
P R E F E R _ N I N J A
2019-03-15 05:15:28 +08:00
O P T I O N S
2019-06-25 06:22:57 +08:00
- D I N S T A L L _ B I N _ D I R : S T R I N G = b i n
- D I N S T A L L _ L I B _ D I R : S T R I N G = l i b
2019-09-25 03:58:38 +08:00
- D E N A B L E _ C U D A = $ { E N A B L E _ C U D A }
- D E N A B L E _ C U D N N = $ { E N A B L E _ C U D N N }
- D E N A B L E _ O P E N C V = $ { E N A B L E _ O P E N C V }
2019-03-15 05:15:28 +08:00
)
vcpkg_install_cmake ( )
2020-03-05 02:51:49 +08:00
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /debug/bin/darknet ${ VCPKG_TARGET_EXECUTABLE_SUFFIX } )
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /debug/bin/uselib ${ VCPKG_TARGET_EXECUTABLE_SUFFIX } )
if ( EXISTS ${ CURRENT_PACKAGES_DIR } /debug/bin/uselib_track ${ VCPKG_TARGET_EXECUTABLE_SUFFIX } )
file ( REMOVE ${ CURRENT_PACKAGES_DIR } /debug/bin/uselib_track ${ VCPKG_TARGET_EXECUTABLE_SUFFIX } )
2019-03-15 05:15:28 +08:00
endif ( )
2019-09-25 03:58:38 +08:00
file ( MAKE_DIRECTORY ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } )
2020-03-05 02:51:49 +08:00
file ( RENAME ${ CURRENT_PACKAGES_DIR } /bin/darknet ${ VCPKG_TARGET_EXECUTABLE_SUFFIX } ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } /darknet ${ VCPKG_TARGET_EXECUTABLE_SUFFIX } )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /bin/uselib ${ VCPKG_TARGET_EXECUTABLE_SUFFIX } ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } /uselib ${ VCPKG_TARGET_EXECUTABLE_SUFFIX } )
if ( EXISTS ${ CURRENT_PACKAGES_DIR } /bin/uselib_track ${ VCPKG_TARGET_EXECUTABLE_SUFFIX } )
file ( RENAME ${ CURRENT_PACKAGES_DIR } /bin/uselib_track ${ VCPKG_TARGET_EXECUTABLE_SUFFIX } ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } /uselib_track ${ VCPKG_TARGET_EXECUTABLE_SUFFIX } )
2019-03-15 05:15:28 +08:00
endif ( )
2019-09-25 03:58:38 +08:00
file ( COPY ${ SOURCE_PATH } /cfg DESTINATION ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } )
file ( COPY ${ SOURCE_PATH } /data DESTINATION ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } )
vcpkg_copy_tool_dependencies ( ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } )
2019-03-15 05:15:28 +08:00
if ( VCPKG_LIBRARY_LINKAGE STREQUAL static )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /bin ${ CURRENT_PACKAGES_DIR } /debug/bin )
endif ( )
2019-03-23 01:25:15 +08:00
vcpkg_fixup_cmake_targets ( )
2019-03-15 05:15:28 +08:00
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/share )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/include )
2019-09-25 03:58:38 +08:00
file ( INSTALL ${ SOURCE_PATH } /LICENSE DESTINATION ${ CURRENT_PACKAGES_DIR } /share/ ${ PORT } RENAME copyright )
2019-03-15 05:15:28 +08:00
if ( "weights" IN_LIST FEATURES )
2020-08-08 07:10:58 +08:00
file ( COPY ${ VCPKG_ROOT_DIR } /downloads/darknet-cache/yolov4-tiny.weights DESTINATION ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } )
file ( COPY ${ VCPKG_ROOT_DIR } /downloads/darknet-cache/yolov4.weights DESTINATION ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } )
file ( COPY ${ VCPKG_ROOT_DIR } /downloads/darknet-cache/yolov3-tiny-prn.weights DESTINATION ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } )
file ( COPY ${ VCPKG_ROOT_DIR } /downloads/darknet-cache/yolov3-openimages.weights DESTINATION ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } )
2019-09-25 03:58:38 +08:00
file ( COPY ${ VCPKG_ROOT_DIR } /downloads/darknet-cache/yolov3.weights DESTINATION ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } )
file ( COPY ${ VCPKG_ROOT_DIR } /downloads/darknet-cache/yolov2.weights DESTINATION ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } )
file ( COPY ${ VCPKG_ROOT_DIR } /downloads/darknet-cache/yolov3-tiny.weights DESTINATION ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } )
file ( COPY ${ VCPKG_ROOT_DIR } /downloads/darknet-cache/yolov2-tiny.weights DESTINATION ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } )
2019-03-15 05:15:28 +08:00
endif ( )
2019-07-30 02:14:39 +08:00
if ( "weights-train" IN_LIST FEATURES )
2020-08-08 07:10:58 +08:00
file ( COPY ${ VCPKG_ROOT_DIR } /downloads/darknet-cache/yolov4-tiny.conv.29 DESTINATION ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } )
file ( COPY ${ VCPKG_ROOT_DIR } /downloads/darknet-cache/yolov4.conv.137 DESTINATION ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } )
2019-09-25 03:58:38 +08:00
file ( COPY ${ VCPKG_ROOT_DIR } /downloads/darknet-cache/darknet53.conv.74 DESTINATION ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } )
file ( COPY ${ VCPKG_ROOT_DIR } /downloads/darknet-cache/darknet19_448.conv.23 DESTINATION ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } )
2019-07-30 02:14:39 +08:00
endif ( )