]> git.lyx.org Git - lyx.git/blobdiff - development/cmake/modules/FindGNUWIN32.cmake
Mark created moc-files as GENERATED
[lyx.git] / development / cmake / modules / FindGNUWIN32.cmake
index 43397890ce6538350c8d5be10c0867125d36e3ec..9ccec335dcc552400084b8bc9dee86b71d1dec49 100644 (file)
@@ -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,8 @@ if(WIN32)
                endif()
        else()
                if (GNUWIN32_FIND_REQUIRED)
-                       message(SEND_ERROR "Could NOT find GNUWIN32")
+                       set(GNUWIN32_DIR CACHE PATH FORCE)
+                       message(FATAL_ERROR "Could NOT find GNUWIN32, please set GNUWIN32_DIR")
                endif()
        endif()