]> git.lyx.org Git - lyx.git/blob - development/cmake/modules/FindEnchant.cmake
Add doc for vcs comparison
[lyx.git] / development / cmake / modules / FindEnchant.cmake
1 if(WIN32)
2         find_library(ENCHANT_LIBRARY "libenchant")
3         find_path(ENCHANT_INCLUDE_DIR "enchant++.h")
4 else()
5   find_library(ENCHANT_LIBRARY "enchant"  
6         "/usr/local/lib" 
7         "/usr/lib" 
8         "/usr/local/lib" 
9         "/opt/local/lib")
10   find_path(ENCHANT_INCLUDE_DIR "enchant++.h" PATHS 
11                 /usr/local/include
12                 /usr/local/include/enchant
13                 /usr/include
14                 /usr/include/enchant
15                 /opt/local/include/enchant)
16 endif()
17
18 if (ENCHANT_LIBRARY AND ENCHANT_INCLUDE_DIR)
19         set(ENCHANT_FOUND TRUE)
20         add_definitions(-DUSE_ENCHANT=1)
21         message(STATUS "Building with USE_ENCHANT")
22 else()
23         message(STATUS "Enchant not found, building without enchant support")
24 endif()
25
26
27 # handle the QUIETLY and REQUIRED arguments and 
28 # set ENCHANT_FOUND to TRUE if all listed variables are TRUE
29 include(FindPackageHandleStandardArgs)
30 find_package_handle_standard_args(ENCHANT DEFAULT_MSG ENCHANT_LIBRARY ENCHANT_INCLUDE_DIR)
31
32 if(Enchant_FIND_REQUIRED AND NOT ENCHANT_FOUND)
33         message(FATAL_ERROR "Could not find Enchant library")
34 endif()
35
36 mark_as_advanced(ENCHANT_LIBRARY ENCHANT_INCLUDE_DIR)