Commit 974dc0cb authored by Alain Vaucher's avatar Alain Vaucher

Delete function that has now become unnecessary

parent b41455fd
...@@ -22,15 +22,6 @@ if(has_parent) ...@@ -22,15 +22,6 @@ if(has_parent)
set(DLIB_VERSION ${VERSION} PARENT_SCOPE) set(DLIB_VERSION ${VERSION} PARENT_SCOPE)
endif() endif()
set(dlib_needed_includes)
# This macro sets include directory paths that are needed by dlib and also by
# applications that include dlib. So the main point of this macro is to set
# dlib_needed_includes which will get pushed into the parent cmake scope at the
# end of this CMakeLists.txt file. This way, it is available to users of dlib/cmake.
macro(add_include_directories dir)
set(dlib_needed_includes ${dlib_needed_includes} ${dir})
endmacro()
# Suppress cmake warnings about changes in new versions. # Suppress cmake warnings about changes in new versions.
if(COMMAND cmake_policy) if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW) cmake_policy(SET CMP0003 NEW)
...@@ -224,6 +215,7 @@ if (NOT TARGET dlib) ...@@ -224,6 +215,7 @@ if (NOT TARGET dlib)
) )
set(dlib_needed_libraries) set(dlib_needed_libraries)
set(dlib_needed_includes)
if(UNIX) if(UNIX)
set(CMAKE_THREAD_PREFER_PTHREAD ON) set(CMAKE_THREAD_PREFER_PTHREAD ON)
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
...@@ -331,7 +323,7 @@ if (NOT TARGET dlib) ...@@ -331,7 +323,7 @@ if (NOT TARGET dlib)
if (DLIB_GIF_SUPPORT) if (DLIB_GIF_SUPPORT)
find_package(GIF QUIET) find_package(GIF QUIET)
if (GIF_FOUND) if (GIF_FOUND)
add_include_directories(${GIF_INCLUDE_DIR}) set (dlib_needed_includes ${dlib_needed_includes} ${GIF_INCLUDE_DIR})
set (dlib_needed_libraries ${dlib_needed_libraries} ${GIF_LIBRARY}) set (dlib_needed_libraries ${dlib_needed_libraries} ${GIF_LIBRARY})
else() else()
set(DLIB_GIF_SUPPORT OFF CACHE STRING ${DLIB_GIF_SUPPORT_STR} FORCE ) set(DLIB_GIF_SUPPORT OFF CACHE STRING ${DLIB_GIF_SUPPORT_STR} FORCE )
...@@ -498,8 +490,8 @@ if (NOT TARGET dlib) ...@@ -498,8 +490,8 @@ if (NOT TARGET dlib)
if (DLIB_USE_MKL_FFT) if (DLIB_USE_MKL_FFT)
if (found_intel_mkl AND found_intel_mkl_headers) if (found_intel_mkl AND found_intel_mkl_headers)
set (dlib_needed_includes ${dlib_needed_includes} ${mkl_include_dir})
set (dlib_needed_libraries ${dlib_needed_libraries} ${mkl_libraries}) set (dlib_needed_libraries ${dlib_needed_libraries} ${mkl_libraries})
add_include_directories(${mkl_include_dir})
else() else()
set(DLIB_USE_MKL_FFT OFF CACHE STRING ${DLIB_USE_MKL_FFT_STR} FORCE ) set(DLIB_USE_MKL_FFT OFF CACHE STRING ${DLIB_USE_MKL_FFT_STR} FORCE )
toggle_preprocessor_switch(DLIB_USE_MKL_FFT) toggle_preprocessor_switch(DLIB_USE_MKL_FFT)
...@@ -614,7 +606,7 @@ if (NOT TARGET dlib) ...@@ -614,7 +606,7 @@ if (NOT TARGET dlib)
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) get_filename_component(sqlite_path2 ${sqlite_path} PATH CACHE)
add_include_directories(${sqlite_path2}) 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 )
...@@ -629,7 +621,7 @@ if (NOT TARGET dlib) ...@@ -629,7 +621,7 @@ if (NOT TARGET dlib)
# make sure fftw3.h is in the include path # make sure fftw3.h is in the include path
find_path(fftw_path fftw3.h) find_path(fftw_path fftw3.h)
if (fftw AND fftw_path) if (fftw AND fftw_path)
add_include_directories(${fftw_path}) set(dlib_needed_includes ${dlib_needed_includes} ${fftw_path})
set(dlib_needed_libraries ${dlib_needed_libraries} ${fftw} ) set(dlib_needed_libraries ${dlib_needed_libraries} ${fftw} )
else() else()
set(DLIB_USE_FFTW OFF CACHE STRING ${DLIB_USE_FFTW_STR} FORCE ) set(DLIB_USE_FFTW OFF CACHE STRING ${DLIB_USE_FFTW_STR} FORCE )
......
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