-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Supports: building the library building executables testing generate man page generate pkg-config file installing use older boost for travis so it works in its cmake
- Loading branch information
Showing
20 changed files
with
238 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "external/Catch2"] | ||
path = external/Catch2 | ||
url = https://github.com/catchorg/Catch2.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
project(nuspell VERSION 2.2.0) | ||
set(PROJECT_HOMEPAGE_URL "https://nuspell.github.io/") | ||
include(FindPkgConfig) | ||
include(GNUInstallDirs) | ||
|
||
pkg_check_modules(ICU REQUIRED icu-uc) | ||
find_package(Boost 1.62.0 REQUIRED COMPONENTS locale) | ||
|
||
add_subdirectory(src/hunspell) | ||
add_subdirectory(src/nuspell) | ||
|
||
include(CTest) | ||
execute_process(COMMAND git submodule update --init -- external/Catch2 | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) | ||
add_subdirectory(external/Catch2) | ||
add_subdirectory(tests) | ||
|
||
add_subdirectory(docs) | ||
configure_file(nuspell.pc.in nuspell.pc @ONLY) | ||
|
||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/nuspell.pc | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) | ||
install(FILES README.md DESTINATION ${CMAKE_INSTALL_DOCDIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
find_program(RONN ronn) | ||
if (RONN) | ||
add_custom_command(OUTPUT nuspell.1 | ||
COMMAND | ||
${RONN} -r --pipe ${CMAKE_CURRENT_SOURCE_DIR}/nuspell.1.md > nuspell.1 | ||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/nuspell.1.md | ||
COMMENT "Building manpage nuspell.1") | ||
add_custom_target(nuspell-man-pages ALL DEPENDS nuspell.1) | ||
install(FILES nuspell.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
prefix=@prefix@ | ||
exec_prefix=@exec_prefix@ | ||
libdir=@libdir@ | ||
includedir=@includedir@ | ||
prefix=@CMAKE_INSTALL_PREFIX@ | ||
exec_prefix=${prefix} | ||
libdir=@CMAKE_INSTALL_FULL_LIBDIR@ | ||
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ | ||
|
||
Name: @PACKAGE@ | ||
Name: @PROJECT_NAME@ | ||
Description: Nuspell spellchecking library | ||
URL: @PACKAGE_URL@ | ||
Version: @VERSION@ | ||
Libs: -L${libdir} -lnuspell @BOOST_LOCALE_LDFLAGS@ @BOOST_LOCALE_LIBS@ | ||
URL: @PROJECT_HOMEPAGE_URL@ | ||
Version: @PROJECT_VERSION@ | ||
Libs: -L${libdir} -lnuspell @Boost_LOCALE_LIBRARY@ | ||
Requires: icu-uc | ||
Cflags: -I${includedir} @BOOST_CPPFLAGS@ | ||
Cflags: -I${includedir} -I@Boost_INCLUDE_DIRS@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
add_library(hunspell affentry.cxx affentry.hxx affixmgr.cxx affixmgr.hxx | ||
atypes.hxx baseaffix.hxx csutil.cxx csutil.hxx | ||
filemgr.cxx filemgr.hxx hashmgr.cxx hashmgr.hxx | ||
htypes.hxx hunspell.cxx hunspell.h hunspell.hxx | ||
hunzip.cxx hunzip.hxx langnum.hxx hunvisapi.h | ||
phonet.cxx phonet.hxx replist.cxx replist.hxx | ||
suggestmgr.cxx suggestmgr.hxx utf_info.hxx w_char.hxx) | ||
target_compile_definitions(hunspell PUBLIC HUNSPELL_STATIC) | ||
target_include_directories(hunspell INTERFACE ${PROJECT_SOURCE_DIR}/src) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
add_library(nuspell | ||
aff_data.cxx aff_data.hxx | ||
dictionary.cxx dictionary.hxx | ||
finder.cxx finder.hxx | ||
locale_utils.cxx locale_utils.hxx | ||
string_utils.hxx | ||
structures.cxx structures.hxx) | ||
|
||
target_compile_features(nuspell PUBLIC | ||
cxx_aggregate_default_initializers | ||
cxx_auto_type | ||
cxx_constexpr | ||
cxx_default_function_template_args | ||
cxx_defaulted_functions | ||
cxx_defaulted_move_initializers | ||
cxx_delegating_constructors | ||
cxx_deleted_functions | ||
cxx_extern_templates | ||
cxx_final | ||
cxx_generalized_initializers | ||
cxx_generic_lambdas | ||
cxx_inheriting_constructors | ||
cxx_inline_namespaces | ||
cxx_lambdas | ||
cxx_lambda_init_captures | ||
cxx_noexcept | ||
cxx_nullptr | ||
cxx_override | ||
cxx_range_for | ||
cxx_return_type_deduction | ||
cxx_right_angle_brackets | ||
cxx_rvalue_references | ||
cxx_static_assert | ||
cxx_strong_enums | ||
cxx_thread_local | ||
cxx_trailing_return_types | ||
cxx_unicode_literals | ||
cxx_uniform_initialization | ||
cxx_user_literals | ||
cxx_variable_templates | ||
cxx_variadic_macros | ||
cxx_variadic_templates) | ||
|
||
target_include_directories(nuspell | ||
PRIVATE ${ICU_INCLUDE_DIRS} | ||
INTERFACE ${PROJECT_SOURCE_DIR}/src) | ||
|
||
target_link_libraries(nuspell | ||
PUBLIC Boost::boost | ||
PRIVATE Boost::locale | ||
PRIVATE ${ICU_LIBRARIES}) | ||
|
||
install(TARGETS nuspell DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
install(FILES | ||
aff_data.hxx | ||
dictionary.hxx | ||
finder.hxx | ||
locale_utils.hxx | ||
string_utils.hxx | ||
structures.hxx | ||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nuspell) | ||
|
||
add_executable(nuspell-bin main.cxx) | ||
set_target_properties(nuspell-bin PROPERTIES | ||
OUTPUT_NAME nuspell) | ||
target_link_libraries(nuspell-bin nuspell) | ||
|
||
install(TARGETS nuspell-bin DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
|
||
add_executable(verify verify.cxx) | ||
target_link_libraries(verify nuspell hunspell) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.