diff --git a/development/cmake/modules/FindGNUWIN32.cmake b/development/cmake/modules/FindGNUWIN32.cmake index 8b1b15a673..3fe83dbcd1 100644 --- a/development/cmake/modules/FindGNUWIN32.cmake +++ b/development/cmake/modules/FindGNUWIN32.cmake @@ -2,11 +2,13 @@ if (WIN32) file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles) -find_file(GNUWIN32_DIR gnuwin32 +find_file(GNUWIN32_DIR gnuwin32 win32libs + PATHS ${_progFiles} "C:/" ) + if (GNUWIN32_DIR) set(GNUWIN32_INCLUDE_DIR ${GNUWIN32_DIR}/include) set(GNUWIN32_LIBRARY_DIR ${GNUWIN32_DIR}/lib) diff --git a/development/cmake/modules/LyXPaths.cmake b/development/cmake/modules/LyXPaths.cmake index ce8c1d89fa..f95897fb71 100644 --- a/development/cmake/modules/LyXPaths.cmake +++ b/development/cmake/modules/LyXPaths.cmake @@ -1,10 +1,13 @@ if(WIN32) +find_package(GNUWIN32 REQUIRED) + file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _prog_path) set(_zlib_path ${_prog_path}/zlib) set(_iconv_path ${_prog_path}/iconv) -set(_gnuwin32_dir ${_prog_path}/gnuwin32) + +set(_gnuwin32_dir ${GNUWIN32_DIR}) set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${_gnuwin32_dir}/include