#
# This is a CMake makefile. You can find the cmake utility and
# information about it at http://www.cmake.org
#
cmake_minimum_required(VERSION 2.8.12)
project(dlib)
# Adhere to GNU filesystem layout conventions
include(GNUInstallDirs)
# default to a Release build (except if CMAKE_BUILD_TYPE is set)
include(cmake_utils/release_build_by_default)
include(cmake_utils/use_cpp_11.cmake)
set(CPACK_PACKAGE_VERSION_MAJOR "19")
set(CPACK_PACKAGE_VERSION_MINOR "4")
set(CPACK_PACKAGE_VERSION_PATCH "99")
set(VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
# Set DLIB_VERSION in the including CMake file so they can use it to do whatever they want.
get_directory_property(has_parent PARENT_DIRECTORY)
if(has_parent)
set(DLIB_VERSION ${VERSION} PARENT_SCOPE)
endif()
# Set only because there are old target_link_libraries() statements in the
# FindCUDA.cmake file that comes with CMake that error out if the new behavior
# is used.
cmake_policy(SET CMP0023 OLD)
macro (enable_preprocessor_switch option_name)
list(APPEND active_preprocessor_switches "-D${option_name}")
endmacro()
macro (disable_preprocessor_switch option_name)
if (active_preprocessor_switches)
list(REMOVE_ITEM active_preprocessor_switches "-D${option_name}")
endif()
endmacro()
macro (toggle_preprocessor_switch option_name)
if (${option_name})
enable_preprocessor_switch(${option_name})
else()
disable_preprocessor_switch(${option_name})
endif()
endmacro()
# Suppress superfluous randlib warnings about libdlib.a having no symbols on MacOSX.
if (APPLE)
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
endif()
# Don't try to call add_library(dlib) and setup dlib's stuff if it has already
# been done by some other part of the current cmake project. We do this
# because it avoids getting warnings/errors about cmake policy CMP0002. This
# happens when a project tries to call add_subdirectory() on dlib more than
# once. This most often happens when the top level of a project depends on two
# or more other things which both depend on dlib.
if (NOT TARGET dlib)
set (DLIB_ISO_CPP_ONLY_STR
"Enable this if you don't want to compile any non-ISO C++ code (i.e. you don't use any of the API Wrappers)" )
set (DLIB_NO_GUI_SUPPORT_STR
"Enable this if you don't want to compile any of the dlib GUI code" )
set (DLIB_ENABLE_STACK_TRACE_STR
"Enable this if you want to turn on the DLIB_STACK_TRACE macros" )
set (DLIB_USE_BLAS_STR
"Disable this if you don't want to use a BLAS library" )
set (DLIB_USE_LAPACK_STR
"Disable this if you don't want to use a LAPACK library" )
set (DLIB_USE_CUDA_STR
"Disable this if you don't want to use NVIDIA CUDA" )
set (DLIB_PNG_SUPPORT_STR
"Disable this if you don't want to link against libpng" )
set (DLIB_GIF_SUPPORT_STR
"Disable this if you don't want to link against libgif" )
set (DLIB_JPEG_SUPPORT_STR
"Disable this if you don't want to link against libjpeg" )
set (DLIB_LINK_WITH_SQLITE3_STR
"Disable this if you don't want to link against sqlite3" )
#set (DLIB_USE_FFTW_STR "Disable this if you don't want to link against fftw" )
set (DLIB_USE_MKL_FFT_STR
"Disable this is you don't want to use the MKL DFTI FFT implementation" )
set (DLIB_ENABLE_ASSERTS_STR
"Enable this if you want to turn on the DLIB_ASSERT macro" )
option(DLIB_ENABLE_ASSERTS ${DLIB_ENABLE_ASSERTS_STR} OFF)
option(DLIB_ISO_CPP_ONLY ${DLIB_ISO_CPP_ONLY_STR} OFF)
toggle_preprocessor_switch(DLIB_ISO_CPP_ONLY)
option(DLIB_NO_GUI_SUPPORT ${DLIB_NO_GUI_SUPPORT_STR} OFF)
toggle_preprocessor_switch(DLIB_NO_GUI_SUPPORT)
option(DLIB_ENABLE_STACK_TRACE ${DLIB_ENABLE_STACK_TRACE_STR} OFF)
toggle_preprocessor_switch(DLIB_ENABLE_STACK_TRACE)
if(DLIB_ENABLE_ASSERTS)
# Set these variables so they are set in the config.h.in file when dlib
# is installed.
set (DLIB_DISABLE_ASSERTS false)
set (ENABLE_ASSERTS true)
enable_preprocessor_switch(ENABLE_ASSERTS)
disable_preprocessor_switch(DLIB_DISABLE_ASSERTS)
else()
# Set these variables so they are set in the config.h.in file when dlib
# is installed.
set (DLIB_DISABLE_ASSERTS true)
set (ENABLE_ASSERTS false)
disable_preprocessor_switch(ENABLE_ASSERTS)
# Never force the asserts off when doing an in project build. The only
# time this matters is when using visual studio. The visual studio IDE
# has a drop down that lets the user select either release or debug
# builds. The DLIB_ASSERT macro is setup to enable/disable automatically
# based on this drop down (via preprocessor magic). However, if
# DLIB_DISABLE_ASSERTS is defined it permanently disables asserts no
# matter what, which would defeat the visual studio drop down. So here
# we make a point to not do that kind of severe disabling when in a
# project build. It should also be pointed out that DLIB_DISABLE_ASSERTS
# is only needed when building and installing dlib as a separately
# installed library. It doesn't matter when doing an in project build.
if (NOT DLIB_IN_PROJECT_BUILD)
enable_preprocessor_switch(DLIB_DISABLE_ASSERTS)
endif()
endif()
if (DLIB_ISO_CPP_ONLY)
option(DLIB_JPEG_SUPPORT ${DLIB_JPEG_SUPPORT_STR} OFF)
option(DLIB_LINK_WITH_SQLITE3 ${DLIB_LINK_WITH_SQLITE3_STR} OFF)
option(DLIB_USE_BLAS ${DLIB_USE_BLAS_STR} OFF)
option(DLIB_USE_LAPACK ${DLIB_USE_LAPACK_STR} OFF)
option(DLIB_USE_CUDA ${DLIB_USE_CUDA_STR} OFF)
option(DLIB_PNG_SUPPORT ${DLIB_PNG_SUPPORT_STR} OFF)
option(DLIB_GIF_SUPPORT ${DLIB_GIF_SUPPORT_STR} OFF)
#option(DLIB_USE_FFTW ${DLIB_USE_FFTW_STR} OFF)
option(DLIB_USE_MKL_FFT ${DLIB_USE_MKL_FFT_STR} OFF)
else()
option(DLIB_JPEG_SUPPORT ${DLIB_JPEG_SUPPORT_STR} ON)
option(DLIB_LINK_WITH_SQLITE3 ${DLIB_LINK_WITH_SQLITE3_STR} ON)
option(DLIB_USE_BLAS ${DLIB_USE_BLAS_STR} ON)
option(DLIB_USE_LAPACK ${DLIB_USE_LAPACK_STR} ON)
option(DLIB_USE_CUDA ${DLIB_USE_CUDA_STR} ON)
option(DLIB_PNG_SUPPORT ${DLIB_PNG_SUPPORT_STR} ON)
option(DLIB_GIF_SUPPORT ${DLIB_GIF_SUPPORT_STR} ON)
#option(DLIB_USE_FFTW ${DLIB_USE_FFTW_STR} ON)
option(DLIB_USE_MKL_FFT ${DLIB_USE_MKL_FFT_STR} ON)
endif()
toggle_preprocessor_switch(DLIB_JPEG_SUPPORT)
toggle_preprocessor_switch(DLIB_USE_BLAS)
toggle_preprocessor_switch(DLIB_USE_LAPACK)
toggle_preprocessor_switch(DLIB_USE_CUDA)
toggle_preprocessor_switch(DLIB_PNG_SUPPORT)
toggle_preprocessor_switch(DLIB_GIF_SUPPORT)
#toggle_preprocessor_switch(DLIB_USE_FFTW)
toggle_preprocessor_switch(DLIB_USE_MKL_FFT)
set(source_files
base64/base64_kernel_1.cpp
bigint/bigint_kernel_1.cpp
bigint/bigint_kernel_2.cpp
bit_stream/bit_stream_kernel_1.cpp
entropy_decoder/entropy_decoder_kernel_1.cpp
entropy_decoder/entropy_decoder_kernel_2.cpp
entropy_encoder/entropy_encoder_kernel_1.cpp
entropy_encoder/entropy_encoder_kernel_2.cpp
md5/md5_kernel_1.cpp
tokenizer/tokenizer_kernel_1.cpp
unicode/unicode.cpp
data_io/image_dataset_metadata.cpp
data_io/mnist.cpp
dnn/cpu_dlib.cpp
dnn/tensor_tools.cpp
)
set(dlib_needed_libraries)
set(dlib_needed_includes)
if (DLIB_ISO_CPP_ONLY)
add_library(dlib STATIC ${source_files} )
if (UNIX AND NOT DLIB_IN_PROJECT_BUILD)
add_library(dlib_shared SHARED ${source_files} )
add_dependencies(dlib_shared dlib)
xyq2024
- 粉丝: 2974
- 资源: 5575
最新资源
- TMS320F28069控制500-1000Vdc 0-60A 30KW 三相PFC充电桩程序
- 双馈风机 DFIG 低电压穿越 MATLAB仿真模型 LVRT 双馈异步风力 Crowbar电路 (1)转子侧变器采用基于定子电压定向的矢量控制策略,有功无功解耦,具备MPPT能力,采用功率外环电
- 电机控制器,FPGA 硬件电流环 基于FPGA的永磁同步伺服控制系统的设计,在FPGA实现了伺服电机的矢量控制 有坐标变,电流环,速度环,位置环,电机反馈接口,SVPWM Verilog
- 鲁棒优化多阶段规划 利用列和约束生成(C&CG)算法进行求解 提升了配电网对可再生能源的消纳能力且改善了配电网的运行指标,同时又保证了微电网投资商的经济利益,有效实现了配电网与微电网的协调发展
- 脉振方波HFI HFI脉振方波高频注入模型代码和matlab仿真 码基于TI283x,:::仿真和相关文档齐全,有仿真的代码,仿真也可以生成代码
- 主机欧姆龙CP1H,主机带四轴,从机CP1H带数轴进行运动控制 全自动CE锂电极片多极耳连续冲切机 欧姆龙CP1H+MCGS昆仑通态触摸屏 伺服电机控制,电阻尺应用控制,电芯极耳间距定长冲切控制,涵盖
- 物流中心选址规划 帝企鹅优化调度算法 基于帝企鹅优化算法的全国物流中心选址规划算法MATLAB程序源代码及完整数据表格(Excel文件,详见附图) 程序到手可运行 关联词:备选点选址规划,调度
- 风机变桨控制FAST与MATLAB SIMULINK联合仿真模型非线性风力发电机的 PID独立变桨和统一变桨控制下仿真模型,对于5WM非线性风机风机进行控制 链接simulink的scope出转速对比
- 逆变器光伏并网逆变器资料,包含原理图,pcb,源码以及元器件明细表 如下: 1) 功率接口板原理图和pcb,元器件明细表 2) 主控DSP板原理图(pdf);如果有需要,可发mentor版
- PSASP环境下基于PMU同步测量的分区惯量估计方法,附资料 对应主要模式下的频率、分区联络线功率测量,做为PMU计算的依据: 1、恒功率负荷模式; 2、感应电动机负荷模式; 3、1模式基础上叠加2
- TMS320F28069控制500-1000Vdc 0-60A 30KW 三相PFC充电桩硬件设计
- 基于simulink的FCV燃料电池电动汽车模型 包含3个汽车模型,双输入DCDC模型,电池管理系统模型 模型建模清晰,运行良好,部分内容如截图所示 需要matlab2015b
- 基于Html与C#、CSS、JavaScript的Blazor入门课程设计源码
- 西门子1500PLC大型立体仓库堆垛机输送机程序项目,具体为智能物流实际项目案例,成熟并且稳定的运行现场,有一万多个库位,输送机一百多个,堆垛机八个,仓库分楼下和楼上两层,以西门子1500plc为控制
- 24V 65W 120W 350W反激电源 全套资料(原理图+PCB+变压器规格+测试报告)
- PMSM模型预测电流控制集(MPCC):单矢量,双矢量,三矢量;单步预测,两步预测,三步预测;两点平,三电平;无差拿预测...... 仿真模型和文档包括且不限于:见图
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈