7 # check if GNUWIN32_DIR is already set
8 # (e.g. by command line argument or the calling script)
10 # check for enviroment variable
11 file(TO_CMAKE_PATH "$ENV{GNUWIN32_DIR}" GNUWIN32_DIR)
13 # search in the default program install folder
14 file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles)
15 find_file(GNUWIN32_DIR gnuwin32 win32libs
18 "C:/" "D:/" "E:/" "F:/" "G:/"
24 set(GNUWIN32_INCLUDE_DIR ${GNUWIN32_DIR}/include)
25 set(GNUWIN32_LIBRARY_DIR ${GNUWIN32_DIR}/lib)
26 set(GNUWIN32_BINARY_DIR ${GNUWIN32_DIR}/bin)
27 set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${GNUWIN32_INCLUDE_DIR})
28 set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${GNUWIN32_LIBRARY_DIR})
29 set(GNUWIN32_FOUND TRUE)
35 if (NOT GNUWIN32_FIND_QUIETLY)
36 message(STATUS "Found GNUWIN32: ${GNUWIN32_DIR}")
39 if (GNUWIN32_FIND_REQUIRED)
40 set(GNUWIN32_DIR CACHE PATH FORCE)
41 message(STATUS "ERROR: Could NOT find GNUWIN32, please set GNUWIN32_DIR")
42 message(STATUS "ERROR: or let cmake download all required files by using -DLYX_DEPENDENCIES_DOWNLOAD=1")