mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-03 18:31:28 +00:00
cmake: Memoize include checks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8478>
This commit is contained in:
parent
593dc0356c
commit
c963597525
1 changed files with 8 additions and 1 deletions
|
@ -178,10 +178,17 @@ endmacro()
|
||||||
macro(_gst_filter_missing_directories GST_INCLUDE_DIRS)
|
macro(_gst_filter_missing_directories GST_INCLUDE_DIRS)
|
||||||
set(_gst_include_dirs)
|
set(_gst_include_dirs)
|
||||||
foreach(DIR IN LISTS ${GST_INCLUDE_DIRS})
|
foreach(DIR IN LISTS ${GST_INCLUDE_DIRS})
|
||||||
if ((IS_DIRECTORY "${DIR}") AND (EXISTS "${DIR}"))
|
string(MAKE_C_IDENTIFIER "${DIR}" _gst_dir_id)
|
||||||
|
if (DEFINED _gst_exists_${_gst_dir_id})
|
||||||
|
if (_gst_exists_${_gst_dir_id})
|
||||||
|
list(APPEND _gst_include_dirs "${DIR}")
|
||||||
|
endif()
|
||||||
|
elseif (EXISTS "${DIR}")
|
||||||
list(APPEND _gst_include_dirs "${DIR}")
|
list(APPEND _gst_include_dirs "${DIR}")
|
||||||
|
set(_gst_exists_${_gst_dir_id} TRUE)
|
||||||
else()
|
else()
|
||||||
message(WARNING "Skipping missing include folder ${DIR}.")
|
message(WARNING "Skipping missing include folder ${DIR}.")
|
||||||
|
set(_gst_exists_${_gst_dir_id} FALSE)
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
set(${GST_INCLUDE_DIRS} "${_gst_include_dirs}")
|
set(${GST_INCLUDE_DIRS} "${_gst_include_dirs}")
|
||||||
|
|
Loading…
Reference in a new issue