1
0
Fork 0

Allow to build against packaged version of hunspell library.

Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
This commit is contained in:
Vitaly Zaitsev 2020-02-24 17:17:49 +01:00 committed by John Preston
parent 4c69234334
commit 0c4fe1750f

View file

@ -4,6 +4,16 @@
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
if (DESKTOP_APP_USE_PACKAGED)
add_library(external_hunspell INTERFACE IMPORTED)
add_library(desktop-app::external_hunspell ALIAS external_hunspell)
find_package(PkgConfig REQUIRED)
pkg_check_modules(HUNSPELL REQUIRED hunspell)
target_include_directories(external_hunspell INTERFACE ${HUNSPELL_INCLUDE_DIRS})
target_link_libraries(external_hunspell INTERFACE ${HUNSPELL_LIBRARIES})
else()
add_library(external_hunspell OBJECT)
add_library(desktop-app::external_hunspell ALIAS external_hunspell)
init_target(external_hunspell "(external)")
@ -50,3 +60,4 @@ target_compile_definitions(external_hunspell
PUBLIC
HUNSPELL_STATIC
)
endif()