]> git.lyx.org Git - lyx.git/blob - development/cmake/modules/FindGNUWIN32.cmake
3fe83dbcd12bb6522cca47782857ed8cfe5e1005
[lyx.git] / development / cmake / modules / FindGNUWIN32.cmake
1 if (WIN32)
2
3 file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles)
4
5 find_file(GNUWIN32_DIR gnuwin32 win32libs 
6    PATHS
7    ${_progFiles}
8    "C:/"
9 )
10
11
12 if (GNUWIN32_DIR)
13    set(GNUWIN32_INCLUDE_DIR ${GNUWIN32_DIR}/include)
14    set(GNUWIN32_LIBRARY_DIR ${GNUWIN32_DIR}/lib)
15    set(GNUWIN32_BINARY_DIR  ${GNUWIN32_DIR}/bin)
16    set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${GNUWIN32_INCLUDE_DIR})
17    set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${GNUWIN32_LIBRARY_DIR})
18    set(GNUWIN32_FOUND TRUE)
19 else (GNUWIN32_DIR)
20    set(GNUWIN32_FOUND)
21 endif (GNUWIN32_DIR)
22
23 if (GNUWIN32_FOUND)
24   if (NOT GNUWIN32_FIND_QUIETLY)
25     message(STATUS "Found GNUWIN32: ${GNUWIN32_DIR}")
26   endif (NOT GNUWIN32_FIND_QUIETLY)
27 else (GNUWIN32_FOUND)
28   if (GNUWIN32_FIND_REQUIRED)
29     message(SEND_ERROR "Could NOT find GNUWIN32")
30   endif (GNUWIN32_FIND_REQUIRED)
31 endif (GNUWIN32_FOUND)
32
33 endif (WIN32)
34