Support building dlib from a top-level CMakeLists file

This follows convention which simplifies using dlib as a CMake
ExternalProject.
This commit is contained in:
Taylor Braun-Jones 2016-02-25 12:51:13 -05:00
parent 2a3cf8732b
commit 378431eeea
2 changed files with 3 additions and 1 deletions

2
CMakeLists.txt Normal file
View File

@ -0,0 +1,2 @@
cmake_minimum_required(VERSION 2.8.4)
add_subdirectory(dlib)

View File

@ -432,7 +432,7 @@ if (NOT TARGET dlib)
ARCHIVE DESTINATION lib) ARCHIVE DESTINATION lib)
endif() endif()
install(DIRECTORY ${CMAKE_SOURCE_DIR}/ DESTINATION include/dlib install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION include/dlib
FILES_MATCHING PATTERN "*.h" FILES_MATCHING PATTERN "*.h"
REGEX "${CMAKE_CURRENT_BINARY_DIR}" EXCLUDE) REGEX "${CMAKE_CURRENT_BINARY_DIR}" EXCLUDE)