From b1dab227dc5d843dcefa6477005d9868ad4f6dc1 Mon Sep 17 00:00:00 2001 From: Viktor Richter Date: Tue, 3 Nov 2015 14:44:30 +0100 Subject: [PATCH] Change relative path of configure files in CMakeLists. Using CMAKE_PROJECT_DIR instead of CMAKE_SOURCE_DIR/../dlib makes the build process more portable. --- dlib/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlib/CMakeLists.txt b/dlib/CMakeLists.txt index 17f72fda5..7ecec147e 100644 --- a/dlib/CMakeLists.txt +++ b/dlib/CMakeLists.txt @@ -432,11 +432,11 @@ if (NOT TARGET dlib) REGEX "${CMAKE_CURRENT_BINARY_DIR}" EXCLUDE) - configure_file(${CMAKE_SOURCE_DIR}/../dlib/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) + configure_file(${PROJECT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) # overwrite config.h with the configured one install(FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h DESTINATION include/dlib) - configure_file(${CMAKE_SOURCE_DIR}/../dlib/revision.h.in ${CMAKE_CURRENT_BINARY_DIR}/revision.h) + configure_file(${PROJECT_SOURCE_DIR}/revision.h.in ${CMAKE_CURRENT_BINARY_DIR}/revision.h) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/revision.h DESTINATION include/dlib) install(FILES "LICENSE.txt" DESTINATION share/doc/dlib)