X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2Fcmake%2Fmodules%2FFindGNUWIN32.cmake;h=93afaef7502db52f19daafb09623969a4d8fd8e0;hb=2a0ae2e7392cd80b633bdaf70ef6824725c38c22;hp=97617a32456b013a686852c35d7b0224a5dee2ff;hpb=f604b54165732d3a03743a20dad44547f6557347;p=lyx.git diff --git a/development/cmake/modules/FindGNUWIN32.cmake b/development/cmake/modules/FindGNUWIN32.cmake index 97617a3245..93afaef750 100644 --- a/development/cmake/modules/FindGNUWIN32.cmake +++ b/development/cmake/modules/FindGNUWIN32.cmake @@ -2,8 +2,6 @@ # from kdelibs # -set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) - if(WIN32) # check if GNUWIN32_DIR is already set @@ -14,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) @@ -42,7 +37,10 @@ if(WIN32) endif() else() if (GNUWIN32_FIND_REQUIRED) - message(SEND_ERROR "Could NOT find GNUWIN32, please set GNUWIN32_DIR") + 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()