-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
DarknetConfig.cmake.in
45 lines (35 loc) · 1.33 KB
/
DarknetConfig.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Config file for the Darknet package
get_filename_component(Darknet_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
list(APPEND CMAKE_MODULE_PATH "${Darknet_CMAKE_DIR}")
include(CMakeFindDependencyMacro)
if(@OpenCV_FOUND@)
find_dependency(OpenCV)
endif()
if(@ENABLE_CUDA@)
include(CheckLanguage)
check_language(CUDA)
if(NOT CMAKE_CUDA_COMPILER)
message(STATUS " --> WARNING: Unable to find native CUDA integration!")
endif()
find_dependency(CUDA)
cuda_select_nvcc_arch_flags(CUDA_ARCH_FLAGS ${CUDA_ARCHITECTURES})
if(@CUDNN_FOUND@)
find_dependency(CUDNN)
endif()
endif()
set(CMAKE_THREAD_PREFER_PTHREAD ON)
find_dependency(Threads)
if(MSVC)
find_dependency(PThreads_windows)
set(CMAKE_CXX_FLAGS "/wd4018 /wd4244 /wd4267 /wd4305 ${CMAKE_CXX_FLAGS}")
endif()
if(@OPENMP_FOUND@)
find_dependency(OpenMP)
endif()
# Our library dependencies (contains definitions for IMPORTED targets)
include("${Darknet_CMAKE_DIR}/DarknetTargets.cmake")
include("${Darknet_CMAKE_DIR}/DarknetConfigVersion.cmake")
get_target_property(FULL_DARKNET_INCLUDE_DIRS Darknet::dark INTERFACE_INCLUDE_DIRECTORIES)
list(GET FULL_DARKNET_INCLUDE_DIRS 0 Darknet_INCLUDE_DIR)
get_filename_component(Darknet_INCLUDE_DIR "${Darknet_INCLUDE_DIR}" REALPATH)
find_package_handle_standard_args(Darknet REQUIRED_VARS Darknet_INCLUDE_DIR VERSION_VAR PACKAGE_VERSION)