forked from phamdinhkhanh/darknetGoogleColab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DarknetConfig.cmake.in
47 lines (37 loc) · 1.22 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
46
47
# Config file for the Darknet package
# It defines the following variables
# Darknet_INCLUDE_DIRS - include directories for Darknet
# Darknet_LIBRARIES - libraries to link against
# Compute paths
get_filename_component(Darknet_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(Darknet_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@")
list(APPEND CMAKE_MODULE_PATH "${Darknet_CMAKE_DIR}")
include(CMakeFindDependencyMacro)
if(@ENABLE_OPENCV@)
find_dependency(OpenCV REQUIRED)
add_definitions(-DOPENCV)
endif()
find_dependency(Stb REQUIRED)
if(@ENABLE_CUDA@)
find_dependency(CUDNN)
add_definitions(-DGPU)
if(CUDNN_FOUND)
add_definitions(-DCUDNN)
if(@CUDA_COMPUTE_MODEL@ VERSION_GREATER_EQUAL @CUDA_COMPUTE_MODEL_70@)
add_definitions(-DCUDNN_HALF)
message(STATUS "Enabled CUDNN_HALF")
endif()
endif()
endif()
set(CMAKE_THREAD_PREFER_PTHREAD ON)
find_dependency(Threads)
if(MSVC)
find_dependency(PThreads_windows)
endif()
if("${CMAKE_VERSION}" VERSION_GREATER "3.9.0")
find_dependency(OpenMP)
endif()
# Our library dependencies (contains definitions for IMPORTED targets)
include("${Darknet_CMAKE_DIR}/DarknetTargets.cmake")
# These are IMPORTED targets created by DarknetTargets.cmake
set(Darknet_LIBRARIES darklib)