mirror of https://github.com/AlexeyAB/darknet.git
42 lines
1.0 KiB
CMake
42 lines
1.0 KiB
CMake
# 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(@ENABLE_OPENCV@)
|
|
find_dependency(OpenCV)
|
|
add_definitions(-DOPENCV)
|
|
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)
|
|
|
|
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")
|