diff --git a/development/cmake/modules/FindGNUWIN32.cmake b/development/cmake/modules/FindGNUWIN32.cmake index 3fe83dbcd1..9a6fa1440d 100644 --- a/development/cmake/modules/FindGNUWIN32.cmake +++ b/development/cmake/modules/FindGNUWIN32.cmake @@ -1,6 +1,8 @@ if (WIN32) -file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles) +if(NOT GNUWIN32_DIR) + file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles) +endif(NOT GNUWIN32_DIR) find_file(GNUWIN32_DIR gnuwin32 win32libs PATHS