darknet/DarknetConfig.cmake.in

46 lines
1.3 KiB
CMake
Raw Normal View History

# Config file for the Darknet package
get_filename_component(Darknet_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
2019-03-14 05:56:44 +08:00
list(APPEND CMAKE_MODULE_PATH "${Darknet_CMAKE_DIR}")
include(CMakeFindDependencyMacro)
2019-05-14 15:46:18 +08:00
if(@OpenCV_FOUND@)
find_dependency(OpenCV)
2019-03-14 05:56:44 +08:00
endif()
if(@ENABLE_CUDA@)
include(CheckLanguage)
check_language(CUDA)
if(NOT CMAKE_CUDA_COMPILER)
message(STATUS " --> WARNING: Unable to find native CUDA integration!")
endif()
2019-07-09 16:39:48 +08:00
find_dependency(CUDA)
cuda_select_nvcc_arch_flags(CUDA_ARCH_FLAGS ${CUDA_ARCHITECTURES})
2019-05-14 15:46:18 +08:00
if(@CUDNN_FOUND@)
find_dependency(CUDNN)
endif()
endif()
set(CMAKE_THREAD_PREFER_PTHREAD ON)
find_dependency(Threads)
2019-07-18 19:14:09 +08:00
if(MSVC)
find_dependency(PThreads_windows)
2019-07-18 19:14:09 +08:00
set(CMAKE_CXX_FLAGS "/wd4018 /wd4244 /wd4267 /wd4305 ${CMAKE_CXX_FLAGS}")
endif()
2019-05-14 15:46:18 +08:00
if(@OPENMP_FOUND@)
find_dependency(OpenMP)
endif()
# Our library dependencies (contains definitions for IMPORTED targets)
include("${Darknet_CMAKE_DIR}/DarknetTargets.cmake")
2019-07-18 19:14:09 +08:00
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)