commit f1694db49681451f9b947f25238f8032769799f8
Author: Scott Kostyshak <[email protected]>
Date:   Thu Mar 12 22:36:49 2020 -0400

    CMake build: find enchant 2.x binary and lib
    
    For example, see the Fedora file lists for the package
    enchant2-devel [1] as well as the Debian Sid file lists for the
    packages libenchant-2-dev [2] and enchant-2 [3]. The packages for
    Ubuntu 20.04 are similar. Our autotools build has had support for
    finding enchant 2.x since 71977769.
    
    Searching for enchant-2 first is consistent with what we do for
    autotools (see 1ae537c5).
    
    This commit is related to #10986.
    
    [1] https://www.lyx.org/trac/ticket/10986#comment:28
    [2] https://packages.debian.org/sid/amd64/libenchant-2-dev/filelist
    [3] https://packages.debian.org/sid/amd64/enchant-2/filelist
---
 development/cmake/modules/FindENCHANT.cmake |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/development/cmake/modules/FindENCHANT.cmake 
b/development/cmake/modules/FindENCHANT.cmake
index d7548a8..2b4dfa3 100644
--- a/development/cmake/modules/FindENCHANT.cmake
+++ b/development/cmake/modules/FindENCHANT.cmake
@@ -2,11 +2,14 @@ if(WIN32)
        find_library(ENCHANT_LIBRARY "libenchant")
        find_path(ENCHANT_INCLUDE_DIR "enchant++.h")
 else()
-  find_library(ENCHANT_LIBRARY "enchant"  
+  find_library(ENCHANT_LIBRARY NAMES "enchant-2" "enchant"
        "/usr/local/lib" 
        ${SYSTEM_LIB_DIRS}
        "/opt/local/lib")
   find_path(ENCHANT_INCLUDE_DIR "enchant++.h" PATHS 
+               /usr/local/include/enchant-2
+               /usr/include/enchant-2
+               /opt/local/include/enchant-2
                /usr/local/include
                /usr/local/include/enchant
                /usr/include
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to