X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2Fcmake%2Fmodules%2FFindEnchant.cmake;h=d7548a84fc68bb5728c12dd2df0758f38cc8e4cd;hb=9dd695b17adfd47a35ea49b9c19cf5984d2d68be;hp=ebc90b796f45a0e6f2cffb66a6a61a23322b0244;hpb=f151f3a30f226231aa9c3f9b8ef466800542c4e0;p=lyx.git diff --git a/development/cmake/modules/FindEnchant.cmake b/development/cmake/modules/FindEnchant.cmake index ebc90b796f..d7548a84fc 100644 --- a/development/cmake/modules/FindEnchant.cmake +++ b/development/cmake/modules/FindEnchant.cmake @@ -4,8 +4,7 @@ if(WIN32) else() find_library(ENCHANT_LIBRARY "enchant" "/usr/local/lib" - "/usr/lib" - "/usr/local/lib" + ${SYSTEM_LIB_DIRS} "/opt/local/lib") find_path(ENCHANT_INCLUDE_DIR "enchant++.h" PATHS /usr/local/include @@ -15,22 +14,9 @@ else() /opt/local/include/enchant) endif() -if (ENCHANT_LIBRARY AND ENCHANT_INCLUDE_DIR) - set(ENCHANT_FOUND TRUE) - add_definitions(-DUSE_ENCHANT=1) - message(STATUS "Building with USE_ENCHANT") -else() - message(STATUS "Enchant not found, building without enchant support") -endif() - - -# handle the QUIETLY and REQUIRED arguments and +# handle the QUIETLY and REQUIRED arguments and # set ENCHANT_FOUND to TRUE if all listed variables are TRUE include(FindPackageHandleStandardArgs) find_package_handle_standard_args(ENCHANT DEFAULT_MSG ENCHANT_LIBRARY ENCHANT_INCLUDE_DIR) -if(Enchant_FIND_REQUIRED AND NOT ENCHANT_FOUND) - message(FATAL_ERROR "Could not find Enchant library") -endif() - mark_as_advanced(ENCHANT_LIBRARY ENCHANT_INCLUDE_DIR)