Fixed sqlite include path finding.

This commit is contained in:
Davis King 2017-10-28 08:50:42 -04:00
parent 82ecd447c8
commit a6592ef60c
1 changed files with 2 additions and 3 deletions

View File

@ -649,13 +649,12 @@ if (NOT TARGET dlib)
# make sure sqlite3.h is in the include path # make sure sqlite3.h is in the include path
find_path(sqlite_path sqlite3.h) find_path(sqlite_path sqlite3.h)
if (sqlite AND sqlite_path) if (sqlite AND sqlite_path)
get_filename_component(sqlite_path2 ${sqlite_path} PATH CACHE) set(dlib_needed_includes ${dlib_needed_includes} ${sqlite_path})
set(dlib_needed_includes ${dlib_needed_includes} ${sqlite_path2})
set(dlib_needed_libraries ${dlib_needed_libraries} ${sqlite} ) set(dlib_needed_libraries ${dlib_needed_libraries} ${sqlite} )
else() else()
set(DLIB_LINK_WITH_SQLITE3 OFF CACHE STRING ${DLIB_LINK_WITH_SQLITE3_STR} FORCE ) set(DLIB_LINK_WITH_SQLITE3 OFF CACHE STRING ${DLIB_LINK_WITH_SQLITE3_STR} FORCE )
endif() endif()
mark_as_advanced(sqlite sqlite_path sqlite_path2) mark_as_advanced(sqlite sqlite_path)
endif() endif()