forked from AlexeyAB/darknet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DarknetConfig.cmake.in
51 lines (40 loc) · 1.44 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
48
49
50
51
# 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()
if(@CUDNN_FOUND@)
find_dependency(CUDNN)
endif()
endif()
set(CMAKE_THREAD_PREFER_PTHREAD ON)
find_dependency(Threads)
if(MSVC)
if(@USE_INTEGRATED_LIBS@)
find_dependency(PThreads4W)
else()
find_dependency(pthreads)
endif()
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")
if(@OpenCV_FOUND@)
set_property(TARGET Darknet::dark APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${OpenCV_INCLUDE_DIRS}")
endif()
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)