加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
柚子 提交于 2022-05-17 09:38 . 改名YoyoOS
cmake_minimum_required(VERSION 3.14)
project(yoyo-debinstaller LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_MODULE_PATH
${CMAKE_CURRENT_SOURCE_DIR}/cmake)
find_package(Qt5 COMPONENTS Core Widgets Quick LinguistTools REQUIRED)
find_package(QApt REQUIRED)
find_package(AptPkg REQUIRED)
# Find the required Libaries
include_directories(
${APTPKG_INCLUDE_DIR})
set(PROJECT_SOURCES
src/main.cpp
src/debinstaller.cpp
qml.qrc
)
add_executable(yoyo-debinstaller
${PROJECT_SOURCES}
)
target_link_libraries(yoyo-debinstaller
PRIVATE
Qt5::Core
Qt5::Widgets
Qt5::Quick
QApt
${APTPKG_LIBRARIES}
)
file(GLOB TS_FILES translations/*.ts)
qt5_create_translation(QM_FILES ${TS_FILES})
add_custom_target(translations DEPENDS ${QM_FILES} SOURCES ${TS_FILES})
add_dependencies(yoyo-debinstaller translations)
install(FILES ${QM_FILES} DESTINATION /usr/share/yoyo-debinstaller/translations)
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES
yoyo-debinstaller.desktop
DESTINATION /usr/share/applications/
COMPONENT Runtime
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化