2020-03-05 01:22:42 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2020-11-13 04:42:40 +08:00
|
|
|
index 835ebfb..82fa335 100644
|
2020-03-05 01:22:42 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2020-11-13 04:42:40 +08:00
|
|
|
@@ -8,7 +8,6 @@ include(GNUInstallDirs)
|
|
|
|
include(CMakePackageConfigHelpers)
|
|
|
|
|
|
|
|
find_package(ICU REQUIRED COMPONENTS uc data)
|
|
|
|
-find_package(Boost 1.48.0 REQUIRED COMPONENTS locale)
|
|
|
|
|
|
|
|
get_directory_property(subproject PARENT_DIRECTORY)
|
|
|
|
|
|
|
|
@@ -20,8 +19,6 @@ if (subproject)
|
2020-03-05 01:22:42 +08:00
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
-add_subdirectory(docs)
|
|
|
|
-
|
2020-04-08 07:36:25 +08:00
|
|
|
function(find_catch2_from_source)
|
|
|
|
set(Catch2_FOUND Catch2-NOTFOUND PARENT_SCOPE)
|
|
|
|
set(catch_cmake_lists ${PROJECT_SOURCE_DIR}/external/Catch2/CMakeLists.txt)
|
2020-03-05 01:22:42 +08:00
|
|
|
diff --git a/src/nuspell/CMakeLists.txt b/src/nuspell/CMakeLists.txt
|
2020-11-13 04:42:40 +08:00
|
|
|
index a8d215f..78553c5 100644
|
2020-03-05 01:22:42 +08:00
|
|
|
--- a/src/nuspell/CMakeLists.txt
|
|
|
|
+++ b/src/nuspell/CMakeLists.txt
|
2020-11-13 04:42:40 +08:00
|
|
|
@@ -27,22 +27,6 @@ target_include_directories(nuspell
|
|
|
|
|
|
|
|
target_link_libraries(nuspell PUBLIC ICU::uc ICU::data)
|
2020-03-05 01:22:42 +08:00
|
|
|
|
|
|
|
-add_executable(nuspell-bin main.cxx)
|
|
|
|
-set_target_properties(nuspell-bin PROPERTIES
|
2020-11-13 04:42:40 +08:00
|
|
|
- RUNTIME_OUTPUT_DIRECTORY ../tools
|
|
|
|
- RUNTIME_OUTPUT_NAME nuspell)
|
2020-03-05 01:22:42 +08:00
|
|
|
-target_compile_definitions(nuspell-bin PRIVATE
|
|
|
|
- PROJECT_VERSION=\"${PROJECT_VERSION}\")
|
|
|
|
-target_link_libraries(nuspell-bin nuspell Boost::locale)
|
2020-11-13 04:42:40 +08:00
|
|
|
-if (BUILD_SHARED_LIBS AND WIN32)
|
|
|
|
- # This should be PRE_LINK (or PRE_BUILD), so Vcpkg's POST_BUILD
|
|
|
|
- # step (see VCPKG_APPLOCAL_DEPS) that copies dll can pick up nuspell.dll
|
|
|
|
- # inside the folder ../tools.
|
|
|
|
- add_custom_command(TARGET nuspell-bin PRE_LINK
|
|
|
|
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
- $<TARGET_FILE:nuspell> $<TARGET_FILE_DIR:nuspell-bin>)
|
|
|
|
-endif()
|
2020-03-05 01:22:42 +08:00
|
|
|
-
|
|
|
|
if (NOT subproject)
|
|
|
|
install(TARGETS nuspell
|
|
|
|
EXPORT NuspellTargets
|
2020-11-13 04:42:40 +08:00
|
|
|
@@ -53,5 +37,4 @@ if (NOT subproject)
|
2020-03-05 01:22:42 +08:00
|
|
|
install(EXPORT NuspellTargets
|
|
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/nuspell
|
|
|
|
NAMESPACE Nuspell::)
|
|
|
|
- install(TARGETS nuspell-bin DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
endif()
|