Do not search for the built-in libraries when compiling with MINGW
This commit is contained in:
parent
5f5b8fdfa0
commit
1841b348f1
|
@ -13,16 +13,18 @@ function(find_pkg_config_with_fallback name)
|
|||
# Found via pkg-config, using its result values
|
||||
set(${name}_FOUND ${${name}_PKG_CONFIG_FOUND})
|
||||
|
||||
if(MINGW)
|
||||
list(FILTER ${name}_PKG_CONFIG_LIBRARIES EXCLUDE REGEX "(ole32)|(gdi32)|(imm32)|(shell32)|(winmm)|(dwmapi)|(setupapi)|(cfgmgr32)|(ws2_32)")
|
||||
endif(MINGW)
|
||||
|
||||
# Try to find real file name of libraries
|
||||
foreach(lib ${${name}_PKG_CONFIG_LIBRARIES})
|
||||
find_library(${name}_${lib}_LIBRARY ${lib} HINTS ${${name}_PKG_CONFIG_LIBRARY_DIRS})
|
||||
mark_as_advanced(${name}_${lib}_LIBRARY)
|
||||
if(NOT ${name}_${lib}_LIBRARY)
|
||||
find_library(${name}_${lib}_LIBRARY ${lib} HINTS "C:/msys64/mingw64/x86_64-w64-mingw32/lib")
|
||||
if(NOT ${name}_${lib}_LIBRARY)
|
||||
message(${name} ": " ${lib} " library not found")
|
||||
unset(${name}_FOUND)
|
||||
endif(NOT ${name}_${lib}_LIBRARY)
|
||||
endif(NOT ${name}_${lib}_LIBRARY)
|
||||
endforeach(lib)
|
||||
if(${name}_FOUND)
|
||||
set(${name}_LIBRARIES "")
|
||||
|
|
|
@ -13,16 +13,18 @@ function(find_pkg_config_with_fallback_on_config_script name)
|
|||
# Found via pkg-config, using it's result values
|
||||
set(${name}_FOUND ${${name}_PKG_CONFIG_FOUND})
|
||||
|
||||
if(MINGW)
|
||||
list(FILTER ${name}_PKG_CONFIG_LIBRARIES EXCLUDE REGEX "(ole32)|(gdi32)|(imm32)|(shell32)|(winmm)|(dwmapi)|(setupapi)|(cfgmgr32)|(ws2_32)")
|
||||
endif(MINGW)
|
||||
|
||||
# Try to find real file name of libraries
|
||||
foreach(lib ${${name}_PKG_CONFIG_LIBRARIES})
|
||||
find_library(${name}_${lib}_LIBRARY ${lib} HINTS ${${name}_PKG_CONFIG_LIBRARY_DIRS})
|
||||
mark_as_advanced(${name}_${lib}_LIBRARY)
|
||||
if(NOT ${name}_${lib}_LIBRARY)
|
||||
find_library(${name}_${lib}_LIBRARY ${lib} HINTS "C:/msys64/mingw64/x86_64-w64-mingw32/lib")
|
||||
if(NOT ${name}_${lib}_LIBRARY)
|
||||
message(${name} ": " ${lib} " library not found")
|
||||
unset(${name}_FOUND)
|
||||
endif(NOT ${name}_${lib}_LIBRARY)
|
||||
endif(NOT ${name}_${lib}_LIBRARY)
|
||||
endforeach(lib)
|
||||
if(${name}_FOUND)
|
||||
set(${name}_LIBRARIES "")
|
||||
|
|
Loading…
Reference in a new issue