From 378431eeeae500e48e363c34ca701db1d34c58ae Mon Sep 17 00:00:00 2001 From: Taylor Braun-Jones Date: Thu, 25 Feb 2016 12:51:13 -0500 Subject: [PATCH] Support building dlib from a top-level CMakeLists file This follows convention which simplifies using dlib as a CMake ExternalProject. --- CMakeLists.txt | 2 ++ dlib/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000..3f9c43e68 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,2 @@ +cmake_minimum_required(VERSION 2.8.4) +add_subdirectory(dlib) diff --git a/dlib/CMakeLists.txt b/dlib/CMakeLists.txt index 6d70f4ab0..6fe72b09e 100644 --- a/dlib/CMakeLists.txt +++ b/dlib/CMakeLists.txt @@ -432,7 +432,7 @@ if (NOT TARGET dlib) ARCHIVE DESTINATION lib) endif() - install(DIRECTORY ${CMAKE_SOURCE_DIR}/ DESTINATION include/dlib + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION include/dlib FILES_MATCHING PATTERN "*.h" REGEX "${CMAKE_CURRENT_BINARY_DIR}" EXCLUDE)