1 Star 0 Fork 12

kwin-workshop/ukui-session-manager

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.71 KB
一键复制 编辑 原始数据 按行查看 历史
公子文彬 提交于 2022-06-06 10:30 . Import Upstream version 2.0.17.1
cmake_minimum_required(VERSION 3.1.0)
project(ukui-session-manager)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed
set(CMAKE_AUTOMOC ON)
# Handle the Qt rcc code generator automatically.
set(CMAKE_AUTORCC ON)
# Create code from a list of Qt designer ui files
set(CMAKE_AUTOUIC ON)
set(CMAKE_CXX_STANDARD 11)
include(GNUInstallDirs)
# Enable funcion names and line numbers even for release builds
add_definitions("-DQT_MESSAGELOGCONTEXT")
# Find the QtWidgets library
find_package(Qt5 COMPONENTS Widgets Core Multimedia X11Extras REQUIRED)
find_package(Qt5LinguistTools)
find_package(KF5IdleTime)
find_package(Qt5DBus)
find_package(KF5CoreAddons)
find_package(KF5Config)
find_package(KF5WindowSystem)
# For debug: cmake -DCMAKE_BUILD_TYPE=debug
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
set(CMAKE_C_FLAGS_DEBUG "-g -O0")
# i18n
set(UKUI_TRANSLATIONS_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/ukui/translations)
add_definitions(
-DUKUI_TRANSLATIONS_DIR="${UKUI_TRANSLATIONS_DIR}"
)
if (NOT DEFINED UPDATE_TRANSLATIONS)
set(UPDATE_TRANSLATIONS "No")
endif()
# To create a new ts file: lupdate -recursive . -target-language en_US -ts translations/en_US.ts -no-ui-lines
file(GLOB TS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts")
# cmake -DUPDATE_TRANSLATIONS=yes
if (UPDATE_TRANSLATIONS)
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
else()
qt5_add_translation(QM_FILES ${TS_FILES})
endif()
add_custom_target(translations ALL DEPENDS ${QM_FILES})
install(FILES ${QM_FILES} DESTINATION ${UKUI_TRANSLATIONS_DIR}/${PROJECT_NAME})
add_subdirectory(ukui-session)
add_subdirectory(tools)
add_subdirectory(data)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kwin-workshop/ukui-session-manager.git
git@gitee.com:kwin-workshop/ukui-session-manager.git
kwin-workshop
ukui-session-manager
ukui-session-manager
openkylin/yangtze

搜索帮助