diff --git a/cmake/modules/FindWine.cmake b/cmake/modules/FindWine.cmake index a697a9dbc..225d6a824 100644 --- a/cmake/modules/FindWine.cmake +++ b/cmake/modules/FindWine.cmake @@ -42,7 +42,7 @@ FOREACH(FLAG ${WINEBUILD_FLAGS}) # Gentoo systems STRING(REPLACE "/lib/wine-" "/lib32/wine-" FLAG "${FLAG}") # WineHQ (/opt/wine-stable, /opt/wine-devel, /opt/wine-staging) - STRING(REPLACE "/lib64/wine/" "/lib/wine/" FLAG "${FLAG}") + STRING(REGEX REPLACE "/lib64$" "/lib" FLAG "${FLAG}") SET(WINE_32_LIBRARY_DIR "${FLAG}/") ENDIF() diff --git a/cmake/modules/winegcc_wrapper.in b/cmake/modules/winegcc_wrapper.in index fee88c496..d7d680be2 100755 --- a/cmake/modules/winegcc_wrapper.in +++ b/cmake/modules/winegcc_wrapper.in @@ -40,7 +40,7 @@ fi # Some Wine distributions can't find their own headers. WINE_INCLUDE_DIR provided # by FindWine.cmake -extra_args="-I@WINE_INCLUDE_DIR@" +extra_args="-I@WINE_INCLUDE_DIR@ -I@WINE_INCLUDE_DIR@/wine/windows" # Apply -m32 library fix if necessary if [ "$win32" = true ] && [ "$no_link" != true ]; then