2007-05-21 12:30:04 -04:00
|
|
|
#
|
2018-01-04 18:54:18 -05:00
|
|
|
# Copyright (C) 2003-2018 Sébastien Helleu <flashcode@flashtux.org>
|
2010-06-22 13:46:28 -04:00
|
|
|
#
|
|
|
|
# This file is part of WeeChat, the extensible chat client.
|
|
|
|
#
|
|
|
|
# WeeChat is free software; you can redistribute it and/or modify
|
2007-05-21 12:30:04 -04:00
|
|
|
# it under the terms of the GNU General Public License as published by
|
2007-07-02 08:25:13 -04:00
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
2007-05-21 12:30:04 -04:00
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
2010-06-22 13:46:28 -04:00
|
|
|
# WeeChat is distributed in the hope that it will be useful,
|
2007-05-21 12:30:04 -04:00
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2018-11-29 17:16:07 -05:00
|
|
|
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
|
2007-05-21 12:30:04 -04:00
|
|
|
#
|
|
|
|
|
|
|
|
# - Find Aspell
|
2010-03-19 18:33:14 -04:00
|
|
|
# This module finds if libaspell is installed and determines where
|
2007-05-21 12:30:04 -04:00
|
|
|
# the include files and libraries are.
|
|
|
|
#
|
|
|
|
# This code sets the following variables:
|
|
|
|
#
|
|
|
|
# ASPELL_INCLUDE_PATH = path to where aspell.h can be found
|
|
|
|
# ASPELL_LIBRARY = path to where libaspell.so* can be found
|
|
|
|
|
2014-04-12 12:00:27 -04:00
|
|
|
if(ASPELL_FOUND)
|
2007-05-21 12:30:04 -04:00
|
|
|
# Already in cache, be silent
|
|
|
|
SET(ASPELL_FIND_QUIETLY TRUE)
|
2014-04-12 12:00:27 -04:00
|
|
|
endif()
|
2007-05-21 12:30:04 -04:00
|
|
|
|
2014-04-12 12:00:27 -04:00
|
|
|
find_path(ASPELL_INCLUDE_PATH
|
2007-05-21 12:30:04 -04:00
|
|
|
NAMES aspell.h
|
|
|
|
PATHS /usr/include /usr/local/include /usr/pkg/include
|
|
|
|
)
|
|
|
|
|
2014-04-12 12:00:27 -04:00
|
|
|
find_library(ASPELL_LIBRARY
|
2007-05-21 12:30:04 -04:00
|
|
|
NAMES aspell aspell-15
|
|
|
|
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
|
|
|
|
)
|
|
|
|
|
2014-04-12 12:00:27 -04:00
|
|
|
if(ASPELL_INCLUDE_PATH AND ASPELL_LIBRARY)
|
2014-09-20 05:05:48 -04:00
|
|
|
set(ASPELL_FOUND TRUE)
|
|
|
|
|
|
|
|
# check if function aspell_version_string() exists
|
2014-04-12 12:00:27 -04:00
|
|
|
set(CMAKE_REQUIRED_INCLUDES ${ASPELL_INCLUDE_PATH})
|
|
|
|
set(CMAKE_REQUIRED_LIBRARIES ${ASPELL_LIBRARY})
|
|
|
|
check_symbol_exists(aspell_version_string "aspell.h" HAVE_ASPELL_VERSION_STRING)
|
|
|
|
set(CMAKE_REQUIRED_INCLUDES)
|
|
|
|
set(CMAKE_REQUIRED_LIBRARIES)
|
|
|
|
endif()
|
2007-05-21 12:30:04 -04:00
|
|
|
|
2014-04-12 12:00:27 -04:00
|
|
|
mark_as_advanced(
|
2007-05-21 12:30:04 -04:00
|
|
|
ASPELL_INCLUDE_PATH
|
|
|
|
ASPELL_LIBRARY
|
|
|
|
)
|