ukui-search/libchinese-segmentation/libchinese-segmentation.pro

80 lines
2.6 KiB
Prolog
Raw Normal View History

2022-06-18 10:46:14 +08:00
QT -= gui
2022-10-21 11:21:35 +08:00
VERSION = 1.1.0
2022-06-18 10:46:14 +08:00
TARGET = chinese-segmentation
TEMPLATE = lib
DEFINES += LIBCHINESESEGMENTATION_LIBRARY
2022-10-21 11:21:35 +08:00
DEFINES += VERSION='\\"$${VERSION}\\"'
2022-06-18 10:46:14 +08:00
2022-10-21 11:21:35 +08:00
CONFIG += c++11 create_pc create_prl no_install_prl
2022-06-18 10:46:14 +08:00
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
2022-10-21 11:21:35 +08:00
QMAKE_CXXFLAGS += -Werror=return-type -Werror=return-local-addr
#QMAKE_CXXFLAGS += -Werror=uninitialized
QMAKE_CXXFLAGS += -execution-charset:utf-8
2022-06-18 10:46:14 +08:00
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
include(cppjieba/cppjieba.pri)
2022-10-21 11:21:35 +08:00
include(pinyin4cpp/pinyin4cpp.pri)
include(storage-base/storage-base-cedar.pri)
2022-06-18 10:46:14 +08:00
#LIBS += -L/usr/local/lib/libjemalloc -ljemalloc
SOURCES += \
chinese-segmentation.cpp \
2022-10-21 11:21:35 +08:00
hanzi-to-pinyin.cpp
2022-06-18 10:46:14 +08:00
HEADERS += \
2022-10-21 11:21:35 +08:00
chinese-segmentation-private.h \
2022-06-18 10:46:14 +08:00
chinese-segmentation.h \
2022-10-21 11:21:35 +08:00
common-struct.h \
hanzi-to-pinyin-private.h \
hanzi-to-pinyin.h \
pinyin4cpp-common.h \
libchinese-segmentation_global.h
2022-06-18 10:46:14 +08:00
dict_files.path = /usr/share/ukui-search/res/dict/
dict_files.files = $$PWD/dict/*.utf8\
dict_files.files += $$PWD/dict/pos_dict/*.utf8\
dict_files.files += $$PWD/dict/*.txt\
2022-10-21 11:21:35 +08:00
dict_files.files += $$PWD/pinyin4cpp/dict/*.txt
2022-06-18 10:46:14 +08:00
INSTALLS += \
dict_files \
# Default rules for deployment.
unix {
target.path = $$[QT_INSTALL_LIBS]
2022-10-21 11:21:35 +08:00
QMAKE_PKGCONFIG_NAME = chinese-segmentation
QMAKE_PKGCONFIG_DESCRIPTION = chinese-segmentation Header files
QMAKE_PKGCONFIG_VERSION = $$VERSION
QMAKE_PKGCONFIG_LIBDIR = $$target.path
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
QMAKE_PKGCONFIG_INCDIR = /usr/include/chinese-seg
QMAKE_PKGCONFIG_CFLAGS += -I/usr/include/chinese-seg
2022-06-18 10:46:14 +08:00
!isEmpty(target.path): INSTALLS += target
2022-10-21 11:21:35 +08:00
header.path = /usr/include/chinese-seg
header.files += chinese-segmentation.h libchinese-segmentation_global.h common-struct.h hanzi-to-pinyin.h pinyin4cpp-common.h
header.files += development-files/header-files/*
# headercppjieba.path = /usr/include/chinese-seg/cppjieba/
# headercppjieba.files = cppjieba/*
INSTALLS += header
}
2022-06-18 10:46:14 +08:00
#DISTFILES += \
# jiaba/jieba.pri
DISTFILES += \
2022-10-21 11:21:35 +08:00
development-files/header-files/* \
pinyin4cpp/pinyin4cpp.pri