From ff12bc69902c2c08ae41cfd33192987efe1525cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20K=C3=BCmmel?= Date: Sun, 28 Mar 2010 12:18:03 +0000 Subject: [PATCH] cmake: simplify cmake-gui usage for GNUWIN32 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33887 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/cmake/modules/FindGNUWIN32.cmake | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/development/cmake/modules/FindGNUWIN32.cmake b/development/cmake/modules/FindGNUWIN32.cmake index 97617a3245..9ccec335dc 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,8 @@ 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(FATAL_ERROR "Could NOT find GNUWIN32, please set GNUWIN32_DIR") endif() endif() -- 2.39.5