From 70f559ab60d2fd53dc1b1b5a8df406fa0b315d02 Mon Sep 17 00:00:00 2001 From: Florent Pruvost <florent.pruvost@inria.fr> Date: Mon, 9 Apr 2018 13:09:32 +0200 Subject: [PATCH] force to update the cache variable --- modules/FindPkgconfigLibrariesAbsolutePath.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/FindPkgconfigLibrariesAbsolutePath.cmake b/modules/FindPkgconfigLibrariesAbsolutePath.cmake index a113de1..c36a687 100644 --- a/modules/FindPkgconfigLibrariesAbsolutePath.cmake +++ b/modules/FindPkgconfigLibrariesAbsolutePath.cmake @@ -46,6 +46,7 @@ macro(FIND_PKGCONFIG_LIBRARIES_ABSOLUTE_PATH _prefix) message(FATAL_ERROR "Dependency of ${_prefix} '${_library}' NOT FOUND") endif() unset(_library_path CACHE) + set (${_prefix}_LIBRARIES "${${_prefix}_LIBRARIES}" CACHE INTERNAL "" FORCE) endforeach() set(${_prefix}_STATIC_LIBRARIES_COPY "${${_prefix}_STATIC_LIBRARIES}") set(${_prefix}_STATIC_LIBRARIES "") @@ -54,11 +55,12 @@ macro(FIND_PKGCONFIG_LIBRARIES_ABSOLUTE_PATH _prefix) find_library(_library_path NAMES ${_library} HINTS ${${_prefix}_STATIC_LIBDIR} ${${_prefix}_STATIC_LIBRARY_DIRS} ${_lib_env}) if (_library_path) - list(APPEND ${_prefix}_STATIC_LIBRARIES ${_library_path}) + list(APPEND ${_prefix}_STATIC_LIBRARIES ${_library_path}) else() message(FATAL_ERROR "Dependency of ${_prefix} '${_library}' NOT FOUND") endif() unset(_library_path CACHE) + set (${_prefix}_STATIC_LIBRARIES "${${_prefix}_STATIC_LIBRARIES}" CACHE INTERNAL "" FORCE) endforeach() endmacro() -- GitLab