X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2Fcmake%2Fmodules%2FFindGNUWIN32.cmake;h=93afaef7502db52f19daafb09623969a4d8fd8e0;hb=2a0ae2e7392cd80b633bdaf70ef6824725c38c22;hp=c0836002867a1601b3d759f56664006fbccd4fb2;hpb=83c9b040e7aca8ae772f89a720f0d7d6e0da4c74;p=lyx.git diff --git a/development/cmake/modules/FindGNUWIN32.cmake b/development/cmake/modules/FindGNUWIN32.cmake index c083600286..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") + 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()