Commit 1dc5e002 authored by Davis King's avatar Davis King

Prevent include path clashes from system installs of dlib as well as suppress

warning messages from boost and python system header files.
parent 363c1ad9
......@@ -118,12 +118,6 @@ endif()
INCLUDE_DIRECTORIES("${Boost_INCLUDE_DIRS}")
if (PYTHON_INCLUDE_PATH)
INCLUDE_DIRECTORIES("${PYTHON_INCLUDE_PATH}" )
else()
INCLUDE_DIRECTORIES("${PYTHON_INCLUDE_DIRS}" )
endif()
message(STATUS "USING BOOST_LIBS: ${Boost_LIBRARIES}")
if (WIN32)
......@@ -152,6 +146,14 @@ macro(add_python_module module_name module_sources )
ADD_LIBRARY(${module_name}_ SHARED ${module_sources} ${ARGN} )
TARGET_LINK_LIBRARIES(${module_name}_ ${Boost_LIBRARIES} dlib::dlib)
target_include_directories(${module_name}_ SYSTEM PUBLIC "${Boost_INCLUDE_DIRS}")
if (PYTHON_INCLUDE_PATH)
target_include_directories(${module_name}_ SYSTEM PUBLIC "${PYTHON_INCLUDE_PATH}" )
else()
target_include_directories(${module_name}_ SYSTEM PUBLIC "${PYTHON_INCLUDE_DIRS}" )
endif()
if(WIN32 AND NOT CYGWIN)
TARGET_LINK_LIBRARIES(${module_name}_ ${PYTHON_LIBRARIES})
SET_TARGET_PROPERTIES( ${module_name}_
......
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