X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2Fcmake%2Fmodules%2FFindGNUWIN32.cmake;h=93afaef7502db52f19daafb09623969a4d8fd8e0;hb=f2e437f6b823574170f0bafd8738dcb3c72b5e14;hp=43397890ce6538350c8d5be10c0867125d36e3ec;hpb=6040a5faf6e6ca8fb88315984a6f3c09c8fcef80;p=lyx.git diff --git a/development/cmake/modules/FindGNUWIN32.cmake b/development/cmake/modules/FindGNUWIN32.cmake index 43397890ce..93afaef750 100644 --- a/development/cmake/modules/FindGNUWIN32.cmake +++ b/development/cmake/modules/FindGNUWIN32.cmake @@ -12,15 +12,12 @@ if(WIN32) if(NOT GNUWIN32_DIR) # search in the default program install folder file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles) - find_file(GNUWIN32_DIR_tmp gnuwin32 win32libs + find_file(GNUWIN32_DIR gnuwin32 win32libs PATHS "${_progFiles}" "C:/" "D:/" "E:/" "F:/" "G:/" ) - set(GNUWIN32_DIR ${GNUWIN32_DIR_tmp}) endif() - else() - set(GNUWIN32_DIR ${GNUWIN32_DIR} CACHE TYPE STRING) endif() if(GNUWIN32_DIR) @@ -40,7 +37,10 @@ if(WIN32) endif() else() if (GNUWIN32_FIND_REQUIRED) - message(SEND_ERROR "Could NOT find GNUWIN32") + set(GNUWIN32_DIR CACHE PATH FORCE) + message(STATUS "ERROR: Could NOT find GNUWIN32, please set GNUWIN32_DIR") + message(STATUS "ERROR: or let cmake download all required files by using -DLYX_DEPENDENCIES_DOWNLOAD=1") + message(FATAL_ERROR) endif() endif()