Commit b024f235 authored by Alain Vaucher's avatar Alain Vaucher

Only specify include directories for dlib_shared if it is built

parent 3eaa463e
...@@ -671,11 +671,13 @@ if (NOT TARGET dlib) ...@@ -671,11 +671,13 @@ if (NOT TARGET dlib)
INTERFACE $<INSTALL_INTERFACE:include> INTERFACE $<INSTALL_INTERFACE:include>
PUBLIC ${dlib_needed_includes} PUBLIC ${dlib_needed_includes}
) )
if (UNIX AND NOT DLIB_IN_PROJECT_BUILD)
target_include_directories(dlib_shared target_include_directories(dlib_shared
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..> INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
INTERFACE $<INSTALL_INTERFACE:include> INTERFACE $<INSTALL_INTERFACE:include>
PUBLIC ${dlib_needed_includes} PUBLIC ${dlib_needed_includes}
) )
endif()
# Install the library # Install the library
if (NOT DLIB_IN_PROJECT_BUILD) if (NOT DLIB_IN_PROJECT_BUILD)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment