darknet/DarknetConfig.cmake.in

42 lines
1.0 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-03-14 05:56:44 +08:00
if(@ENABLE_OPENCV@)
find_dependency(OpenCV)
add_definitions(-DOPENCV)
2019-03-14 05:56:44 +08:00
endif()
find_dependency(Stb)
if(@ENABLE_CUDA@)
add_definitions(-DGPU)
if(@ENABLE_CUDNN@)
find_dependency(CUDNN)
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)
2019-03-14 05:56:44 +08:00
if(MSVC)
find_dependency(PThreads_windows)
#add_definitions(-D_CRT_SECURE_NO_WARNINGS)
#set(CMAKE_CXX_FLAGS "/wd4018 /wd4244 /wd4267 /wd4305 ${CMAKE_CXX_FLAGS}")
endif()
if(@ENABLE_OPENMP@)
find_dependency(OpenMP)
endif()
# Our library dependencies (contains definitions for IMPORTED targets)
include("${Darknet_CMAKE_DIR}/DarknetTargets.cmake")