]> git.lyx.org Git - lyx.git/blob - development/cmake/modules/FindMyThesLIB.cmake
Added libmythes to lyx-build
[lyx.git] / development / cmake / modules / FindMyThesLIB.cmake
1 #
2 #  based on FindZLIB.cmake
3 #  created 2009, Kornel Benko, <kornel.benko@berlin.de>
4 #
5
6 set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
7
8 if (MYTHESLIB_INCLUDE_DIR)
9   # Already in cache, be silent
10   set(MYTHESLIB_FIND_QUIETLY TRUE)
11 endif()
12
13 set(MYTHES_H mythes.hxx)
14 find_path(MYTHESLIB_INCLUDE_DIR ${MYTHES_H}
15  /usr/include
16  /usr/local/include)
17
18 set(POTENTIAL_MYTHES_LIBS mythes)
19
20 find_library(MYTHESLIB_LIBRARY NAMES ${POTENTIAL_MYTHES_LIBS}
21         PATHS
22         /usr/lib /usr/local/lib)
23
24 if(MYTHESLIB_INCLUDE_DIR AND MYTHESLIB_LIBRARY)
25    set(MYTHESLIB_FOUND TRUE)
26 endif()
27
28 if(MYTHESLIB_FOUND)
29    if(NOT MYTHESLIB_FIND_QUIETLY)
30       message(STATUS "Found MYTHES: ${MYTHESLIB_LIBRARY}")
31    endif()
32 else()
33    if(MYTHESLIB_FIND_REQUIRED)
34       message(STATUS "Looked for MYTHES libraries named ${POTENTIAL_MYTHES_LIBS}.")
35       message(STATUS "Found no acceptable MYTHES library. This is fatal.")
36    endif()
37 endif()
38
39 mark_as_advanced(MYTHESLIB_LIBRARY MYTHESLIB_INCLUDE_DIR)