mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 05:01:49 +00:00
Adapt to new hunspell C++ ABI for cmake
The compile test for 3rdparty hunspell is omitted, because the macro check_cxx_source_compiles() tries also to link. But at the time of the check, the required library is not there.
This commit is contained in:
parent
1efef5542b
commit
8774ad51c0
@ -72,6 +72,25 @@ check_type_size("long long" HAVE_LONG_LONG)
|
|||||||
check_type_size(wchar_t HAVE_WCHAR_T)
|
check_type_size(wchar_t HAVE_WCHAR_T)
|
||||||
check_type_size(wint_t HAVE_WINT_T)
|
check_type_size(wint_t HAVE_WINT_T)
|
||||||
|
|
||||||
|
# check whether hunspell C++ (rather than C) ABI is provided
|
||||||
|
if(LYX_EXTERNAL_HUNSPELL)
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES ${HUNSPELL_INCLUDE_DIR})
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ${HUNSPELL_LIBRARY})
|
||||||
|
check_cxx_source_compiles(
|
||||||
|
"
|
||||||
|
#include <hunspell/hunspell.hxx>
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
Hunspell sp(\"foo\", \"bar\");
|
||||||
|
int i = sp.stem(\"test\").size();
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
"
|
||||||
|
HAVE_HUNSPELL_CXXABI)
|
||||||
|
else()
|
||||||
|
# Not compiling the 3rdparty source, because ${HUNSPELL_LIBRARY} does not exists yet to link with
|
||||||
|
set(HAVE_HUNSPELL_CXXABI 1 CACHE BOOL "whether hunspell C++ (rather than C) ABI is provided")
|
||||||
|
endif()
|
||||||
|
|
||||||
#check_cxx_source_compiles(
|
#check_cxx_source_compiles(
|
||||||
# "
|
# "
|
||||||
|
@ -66,6 +66,9 @@
|
|||||||
#define HAVE_ALLOCA
|
#define HAVE_ALLOCA
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* whether hunspell C++ (rather than C) ABI is provided */
|
||||||
|
#cmakedefine HAVE_HUNSPELL_CXXABI 1
|
||||||
|
|
||||||
#cmakedefine HAVE_ICONV_CONST 1
|
#cmakedefine HAVE_ICONV_CONST 1
|
||||||
#ifdef HAVE_ICONV_CONST
|
#ifdef HAVE_ICONV_CONST
|
||||||
#define ICONV_CONST const
|
#define ICONV_CONST const
|
||||||
|
Loading…
Reference in New Issue
Block a user