1 Star 0 Fork 1

AAA Elysia 猫猫侠 ⁧~喵/gxde-deb-installer

forked from GXDE OS/gxde-deb-installer 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 2.08 KB
一键复制 编辑 原始数据 按行查看 历史
gfdgd xi 提交于 2024-08-17 19:54 . 调整包名
cmake_minimum_required(VERSION 3.7)
if (NOT DEFINED VERSION)
set(VERSION 1.2.2)
endif ()
project(gxde-deb-installer)
#set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
if (NOT (${CMAKE_BUILD_TYPE} MATCHES "Debug"))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
# generate qm files
execute_process(COMMAND bash "translate_generation.sh"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
execute_process(COMMAND bash "translate_ts2desktop.sh"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
else ()
set(CMAKE_CXX_COMPILER "clang++")
endif ()
configure_file(environments.h.in environments.h @ONLY)
# Sources files
file(GLOB SRCS "*.h" "*.cpp" "widgets/*.h" "widgets/*.cpp")
# Find the library
find_package(PkgConfig REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Concurrent REQUIRED)
find_package(QApt REQUIRED)
find_package(DtkWidget REQUIRED)
# Tell CMake to create the executable
add_executable(gxde-deb-installer ${SRCS} resources/resources.qrc)
target_include_directories(gxde-deb-installer PUBLIC ${DtkWidget_INCLUDE_DIRS} ${OBJECT_BINARY_DIR})
target_link_libraries(gxde-deb-installer
QApt
${DtkWidget_LIBRARIES}
${Qt5Widgets_LIBRARIES}
${Qt5Concurrent_LIBRARIES}
)
# Install settings
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX /usr)
endif ()
# Install qm files
file(GLOB QM_FILES "translations/*.qm")
install(FILES ${QM_FILES}
DESTINATION share/gxde-deb-installer/translations)
# Install icons
foreach (ICON_SIZE 16 24 32 48 64 96 128 256)
install(FILES resources/images/gxde-deb-installer-${ICON_SIZE}px.svg
RENAME gxde-deb-installer.svg
DESTINATION share/icons/hicolor/${ICON_SIZE}x${ICON_SIZE}/apps)
endforeach ()
install(TARGETS gxde-deb-installer DESTINATION bin)
install(FILES gxde-deb-installer.desktop DESTINATION share/applications)
install(FILES gxde-deb-installer.applications DESTINATION share/application-registry)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qinyinan/gxde-deb-installer.git
git@gitee.com:qinyinan/gxde-deb-installer.git
qinyinan
gxde-deb-installer
gxde-deb-installer
master

搜索帮助