Set the include directories automatically for targets that depend on imported dlib

This commit is contained in:
Alain Vaucher 2017-02-27 17:48:51 +01:00
parent 272e0c799e
commit 8ad068c414
1 changed files with 4 additions and 0 deletions

View File

@ -666,6 +666,10 @@ 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 $<INSTALL_INTERFACE:include>)
target_include_directories(dlib_shared INTERFACE $<INSTALL_INTERFACE:include>)
# 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)")