mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Change minimum CMake version that supports the introduced features
This commit is contained in:
parent
574446aec2
commit
b41455fd26
@ -4,7 +4,7 @@
|
||||
#
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(dlib)
|
||||
|
||||
# default to a Release build (except if CMAKE_BUILD_TYPE is set)
|
||||
@ -646,7 +646,12 @@ if (NOT TARGET dlib)
|
||||
else()
|
||||
add_library(dlib STATIC ${source_files} )
|
||||
endif()
|
||||
target_link_libraries(dlib PRIVATE ${dlib_needed_libraries} )
|
||||
target_include_directories(dlib
|
||||
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
|
||||
INTERFACE $<INSTALL_INTERFACE:include>
|
||||
PUBLIC ${dlib_needed_includes}
|
||||
)
|
||||
target_link_libraries(dlib PRIVATE ${dlib_needed_libraries})
|
||||
if (UNIX AND NOT DLIB_IN_PROJECT_BUILD)
|
||||
if (DLIB_USE_CUDA)
|
||||
cuda_add_library(dlib_shared SHARED ${source_files} )
|
||||
@ -655,7 +660,12 @@ if (NOT TARGET dlib)
|
||||
add_library(dlib_shared SHARED ${source_files} )
|
||||
add_dependencies(dlib_shared dlib)
|
||||
endif()
|
||||
target_link_libraries(dlib_shared PRIVATE ${dlib_needed_libraries} )
|
||||
target_include_directories(dlib_shared
|
||||
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
|
||||
INTERFACE $<INSTALL_INTERFACE:include>
|
||||
PUBLIC ${dlib_needed_includes}
|
||||
)
|
||||
target_link_libraries(dlib_shared PRIVATE ${dlib_needed_libraries})
|
||||
endif()
|
||||
|
||||
endif () ##### end of if NOT DLIB_ISO_CPP_ONLY ##########################################################
|
||||
@ -665,20 +675,6 @@ if (NOT TARGET dlib)
|
||||
ADD_LIBRARY(dlib_all_source_cpp STATIC all/source.cpp)
|
||||
endif()
|
||||
|
||||
# Specify the include directory for CMake targets relying on dlib.
|
||||
target_include_directories(dlib
|
||||
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
|
||||
INTERFACE $<INSTALL_INTERFACE:include>
|
||||
PUBLIC ${dlib_needed_includes}
|
||||
)
|
||||
if (UNIX AND NOT DLIB_IN_PROJECT_BUILD)
|
||||
target_include_directories(dlib_shared
|
||||
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
|
||||
INTERFACE $<INSTALL_INTERFACE:include>
|
||||
PUBLIC ${dlib_needed_includes}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Install the library
|
||||
if (NOT DLIB_IN_PROJECT_BUILD)
|
||||
set (LIB_INSTALL_DIR lib CACHE STRING "Install location of libraries (e.g. lib32 or lib64 for multilib installations)")
|
||||
|
@ -2,7 +2,7 @@
|
||||
# It will trigger a compilation of dlib *in the project*
|
||||
# including it
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
set(DLIB_IN_PROJECT_BUILD true)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
# Make macros that can add compiler switches to the entire project. Not just
|
||||
# to the current cmake folder being built.
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Including this cmake script into your cmake project will cause visual studio
|
||||
# to build your project against the static C runtime.
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
if (POLICY CMP0054)
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
endif()
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(cpp11_test)
|
||||
|
||||
# Try to enable C++11
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(cuda_test)
|
||||
|
||||
include_directories(../../dnn)
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(cudnn_test)
|
||||
include(../use_cpp_11.cmake)
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Also, it sets the COMPILER_CAN_DO_CPP_11 variable to 1 if it was successful.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
# Don't rerun this script if its already been executed.
|
||||
if (DEFINED COMPILER_CAN_DO_CPP_11)
|
||||
|
2
dlib/external/cblas/CMakeLists.txt
vendored
2
dlib/external/cblas/CMakeLists.txt
vendored
@ -4,7 +4,7 @@
|
||||
#
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(cblas)
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
# information about it at http://www.cmake.org
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
# create a variable called target_name and set it to the string "dtest"
|
||||
set (target_name dtest)
|
||||
|
@ -3,7 +3,7 @@
|
||||
# information about it at http://www.cmake.org
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
# This variable contains a list of all the tests we are building
|
||||
# into the regression test suite.
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
add_subdirectory(../../../tools/imglab imglab_build)
|
||||
add_subdirectory(../../../tools/htmlify htmlify_build)
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
PROJECT(examples)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
# information about it at http://www.cmake.org
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
# create a variable called target_name and set it to the string "htmlify"
|
||||
set (target_name htmlify)
|
||||
|
@ -3,7 +3,7 @@
|
||||
# information about it at http://www.cmake.org
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
# create a variable called target_name and set it to the string "imglab"
|
||||
set (target_name imglab)
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.4)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
|
||||
|
||||
|
||||
set(USE_SSE4_INSTRUCTIONS ON CACHE BOOL "Use SSE4 instructions")
|
||||
|
Loading…
Reference in New Issue
Block a user