mirror of https://github.com/PCSX2/pcsx2.git
CMake: Fix cmake reconfigure breaking dependencies
pkg_search_module was looking at our lib_FOUND and thinking it was its own Fixed by tracking who found the library and only invoking pkg_search_module if pkg_search_module also found the library the previous time
This commit is contained in:
parent
146f9a766e
commit
a13222f926
|
@ -7,7 +7,7 @@ endmacro()
|
|||
macro(check_lib var lib)
|
||||
set(_arg_list ${ARGN})
|
||||
|
||||
if(PKG_CONFIG_FOUND AND NOT CMAKE_CROSSCOMPILING)
|
||||
if(PKG_CONFIG_FOUND AND NOT CMAKE_CROSSCOMPILING AND NOT DEFINED pcsx2_manually_found_${var})
|
||||
string(TOLOWER ${lib} lower_lib)
|
||||
pkg_search_module(${var} QUIET IMPORTED_TARGET ${lower_lib})
|
||||
endif()
|
||||
|
@ -31,6 +31,7 @@ macro(check_lib var lib)
|
|||
)
|
||||
_internal_message("-- ${var} found")
|
||||
set(${var}_FOUND 1 CACHE INTERNAL "")
|
||||
set(pcsx2_manually_found_${var} 1 CACHE INTERNAL "")
|
||||
elseif(${var}_LIBRARIES)
|
||||
_internal_message("-- ${var} not found (miss include)")
|
||||
elseif(${var}_INCLUDE)
|
||||
|
|
Loading…
Reference in New Issue