3 # check if GNUWIN32_DIR is already set
4 # (e.g. by command line argument or the calling script)
6 # check for enviroment variable
7 file(TO_CMAKE_PATH "$ENV{GNUWIN32_DIR}" GNUWIN32_DIR)
9 # search in the default program install folder
10 file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles)
11 find_file(GNUWIN32_DIR gnuwin32 win32libs
16 endif(NOT GNUWIN32_DIR)
17 endif(NOT GNUWIN32_DIR)
20 set(GNUWIN32_INCLUDE_DIR ${GNUWIN32_DIR}/include)
21 set(GNUWIN32_LIBRARY_DIR ${GNUWIN32_DIR}/lib)
22 set(GNUWIN32_BINARY_DIR ${GNUWIN32_DIR}/bin)
23 set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${GNUWIN32_INCLUDE_DIR})
24 set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${GNUWIN32_LIBRARY_DIR})
25 set(GNUWIN32_FOUND TRUE)
31 if (NOT GNUWIN32_FIND_QUIETLY)
32 message(STATUS "Found GNUWIN32: ${GNUWIN32_DIR}")
33 endif (NOT GNUWIN32_FIND_QUIETLY)
35 if (GNUWIN32_FIND_REQUIRED)
36 message(SEND_ERROR "Could NOT find GNUWIN32")
37 endif (GNUWIN32_FIND_REQUIRED)
38 endif (GNUWIN32_FOUND)