diff --git a/cmake/PkgConfigWithFallback.cmake b/cmake/PkgConfigWithFallback.cmake index 71041710..f2bfdf66 100644 --- a/cmake/PkgConfigWithFallback.cmake +++ b/cmake/PkgConfigWithFallback.cmake @@ -14,12 +14,12 @@ function(find_pkg_config_with_fallback name) 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)") + set(MINGWLIBPATH ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}) 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}) + find_library(${name}_${lib}_LIBRARY ${lib} HINTS ${${name}_PKG_CONFIG_LIBRARY_DIRS} ${MINGWLIBPATH}) mark_as_advanced(${name}_${lib}_LIBRARY) if(NOT ${name}_${lib}_LIBRARY) message(${name} ": " ${lib} " library not found") diff --git a/cmake/PkgConfigWithFallbackOnConfigScript.cmake b/cmake/PkgConfigWithFallbackOnConfigScript.cmake index 378ec0a1..ca18d5bf 100644 --- a/cmake/PkgConfigWithFallbackOnConfigScript.cmake +++ b/cmake/PkgConfigWithFallbackOnConfigScript.cmake @@ -14,12 +14,12 @@ function(find_pkg_config_with_fallback_on_config_script name) 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)") + set(MINGWLIBPATH ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}) 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}) + find_library(${name}_${lib}_LIBRARY ${lib} HINTS ${${name}_PKG_CONFIG_LIBRARY_DIRS} ${MINGWLIBPATH}) mark_as_advanced(${name}_${lib}_LIBRARY) if(NOT ${name}_${lib}_LIBRARY) message(${name} ": " ${lib} " library not found") diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 54bd5b77..1bb6fecc 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -1,5 +1,3 @@ - - set(GETTEXT_PACKAGE "dino") find_package(Gettext) include(${GETTEXT_USE_FILE})