Skip to content

Commit 0a19aa4

Browse files
author
Alexis Lopez Zubieta
committed
Add QtQuickControls2Application source code
1 parent d274474 commit 0a19aa4

File tree

9 files changed

+940
-0
lines changed

9 files changed

+940
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
cmake_minimum_required(VERSION 3.1.0)
2+
3+
project(QtQuickControls2Application)
4+
5+
# Find includes in corresponding build directories
6+
set(CMAKE_INCLUDE_CURRENT_DIR ON)
7+
set(CMAKE_AUTOMOC ON)
8+
set(CMAKE_AUTOUIC ON)
9+
set(CMAKE_AUTORCC ON)
10+
11+
# Find the QtWidgets library
12+
find_package(Qt5Widgets CONFIG REQUIRED)
13+
find_package(Qt5Qml CONFIG REQUIRED)
14+
15+
add_executable(QtQuickControls2Application src/main.cpp src/qml.qrc)
16+
target_link_libraries(QtQuickControls2Application Qt5::Widgets Qt5::Qml)
17+
18+
install(TARGETS QtQuickControls2Application DESTINATION bin COMPONENT binaries)
19+
install(FILES QtQuickControls2Application.desktop DESTINATION share/applications/ COMPONENT desktop)
20+
install(FILES QtQuickControls2Application.svg DESTINATION share/icons/hicolor/scalable/apps/ COMPONENT desktop)
21+
22+
set(APP_NAME QtQuickControls2Application)
23+
set(APP_TARGET_ARCH x86_64)
24+
set(APP_DESKTOP_FILE_PATH AppDir/${CMAKE_INSTALL_PREFIX}/share/applications/QtQuickControls2Application.desktop)
25+
set(APP_ICON_FILE_PATH AppDir/${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps/QtQuickControls2Application.svg)
26+
27+
set(ENV ARCH=${APP_TARGET_ARCH})
28+
add_custom_target(AppImage
29+
COMMENT "Creating AppImage of ${APP_NAME}"
30+
COMMAND make install DESTDIR=AppDir
31+
COMMAND wget -nc https://github.com/TheAssassin/linuxdeploy/releases/download/continuous/linuxdeploy-${APP_TARGET_ARCH}.AppImage
32+
COMMAND chmod +x ./linuxdeploy-${APP_TARGET_ARCH}.AppImage
33+
COMMAND export ARCH=${APP_TARGET_ARCH} USES_TERMINAL
34+
COMMAND ./linuxdeploy-${APP_TARGET_ARCH}.AppImage -n ${APP_NAME} --appdir AppDir --init-appdir -d ${APP_DESKTOP_FILE_PATH}
35+
-i ${APP_ICON_FILE_PATH} --output appimage
36+
)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Desktop Entry]
2+
Version=1.0
3+
Type=Application
4+
Name=Qt Quick Controls 2 Application
5+
Comment=Application to test Qt Quick Controls 2
6+
TryExec=QtQuickControls2Application
7+
Exec=QtQuickControls2Application
8+
Icon=QtQuickControls2Application
9+
MimeType=image/x-foo;

0 commit comments

Comments
 (0)