代码拉取完成,页面将自动刷新
同步操作将从 hebinq/shuoxie 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# This is a template of a simple template of a fcitx module with name "example"
# Please remember to replace all "[Ee]xample"'s in the files and file names
# to your addon's real name.
cmake_minimum_required(VERSION 2.8.11)
project(shuoxie)
#SET(CMAKE_C_COMPILER "g++") #选择编译器,默认是gcc
set(CMAKE_INSTALL_PREFIX "/usr")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
find_package(Fcitx 4.2.7 REQUIRED)
find_package(PkgConfig REQUIRED)
find_package(X11 REQUIRED)
pkg_check_modules(DBUS "dbus-1" REQUIRED)
pkg_check_modules(DBUS_GLIB "dbus-glib-1" REQUIRED)
pkg_check_modules(GTK3 "gtk+-3.0" REQUIRED)
set(BINDIR ${CMAKE_INSTALL_PREFIX}/bin)
set(DATADIR ${CMAKE_INSTALL_PREFIX}/share)
set(LIBDIR ${CMAKE_INSTALL_PREFIX}/lib)
# This will add a uninstall target. Comment out this line if other cmake packages
# you are using already provides such target (e.g. KDE).
#_fcitx_add_uninstall_target()
include_directories(${FCITX4_FCITX_INCLUDE_DIRS})
include_directories(${FCITX4_FCITX_CONFIG_INCLUDE_DIRS})
include_directories(${FCITX4_FCITX_UTILS_INCLUDE_DIRS})
include_directories("${PROJECT_BINARY_DIR}")
set(CMAKE_C_FLAGS "-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -fvisibility=hidden ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -fvisibility=hidden ${CMAKE_CXX_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed ${CMAKE_SHARED_LINKER_FLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--as-needed ${CMAKE_MODULE_LINKER_FLAGS}")
add_definitions("-DLOCALEDIR=\"${CMAKE_INSTALL_PREFIX}/share/locale\"")
configure_file(config.h.in config.h
IMMEDIATE @ONLY)
# The po dir (and targets, if any) should be added before any other translate
# related sources are processed.
add_subdirectory(theme)
add_subdirectory(data)
add_subdirectory(src)
add_subdirectory(fcitx-im)
add_subdirectory(po)
add_subdirectory(lianxie)
#准备的版本设置
set(_VERSION_MAJOR 2)
set(_VERSION_MINOR 3)
set(_VERSION_PATCH 4)
#说明要生成的是deb包
set(CPACK_GENERATOR "DEB")
############下面是设置debian/control文件中的内容
#设置版本信息
set(CPACK_PACKAGE_VERSION_MAJOR "${_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${_VERSION_PATCH}")
#设置安装包的包名,打好的包将会是packagename-version-linux.deb,如果不设置,默认是工程名
set(CPACK_PACKAGE_NAME "shuoxie")
#设置程序名,就是程序安装后的名字
set(CPACK_DEBIAN_PACKAGE_NAME "shuoxie")
#设置架构
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
#设置依赖
set(CPACK_DEBIAN_PACKAGE_DEPENDS "dbus")
#设置section
set(CPACK_DEBIAN_PACKAGE_SECTION "net")
#设置priority
set(CPACK_DEBIAN_PACKAGE_PRIORITY "Optional")
#设置description
set(CPACK_PACKAGE_DESCRIPTION "说和写识别为文本")
#设置联系方式
set(CPACK_PACKAGE_CONTACT "hebinq@qq.com")
#设置维护人
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "hebinq@qq.com")
##############debian/control设置完成了,下面设置控制脚本,动态库,changelog等
#lib目录下保存这一些动态库和安装控制脚本(postinst、postrm、preinst、prerm) doc目录下是changelog和copyright等文件 这些东西是打包时要依赖的一些额外的东西
#set(LIBS_DIR ${CMAKE_SOURCE_DIR}/lib)
#set(DOCS_DIR ${CMAKE_SOURCE_DIR}/doc)
#设置控制脚本,这些都是大包者本人自己准备的,没有就算了
#set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
# "${LIBS_DIR}/postinst;${LIBS_DIR}/postrm;${LIBS_DIR}/prerm")
#最后把我们的changelog等东西也加进来,project是你的工程名
#install(FILES ${DOCS_DIR}/changelog.Debian.gz ${DOCS_DIR}/changelog.gz ${DOCS_DIR}/copyright ${DOCS_DIR}/README.Debian DESTINATION /usr/share/doc/fcitx-shuoxie)
#最后 别忘记最重要的 我们使用cpack工具来实现打包工作的
include(CPack)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。