File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # User
2- * .user
1+ # C++ objects and libs
2+ * .slo
3+ * .lo
4+ * .o
5+ * .a
6+ * .la
7+ * .lai
8+ * .so
9+ * .so. *
10+ * .dll
11+ * .dylib
312
4- # Build directory
5- build /
13+ # Qt-es
14+ object_script. * .Release
15+ object_script. * .Debug
16+ * _plugin_import.cpp
17+ /.qmake.cache
18+ /.qmake.stash
19+ * .pro.user
20+ * .pro.user. *
21+ * .qbs.user
22+ * .qbs.user. *
23+ * .moc
24+ moc_ * .cpp
25+ moc_ * .h
26+ qrc_ * .cpp
27+ ui_ * .h
28+ * .qmlc
29+ * .jsc
30+ Makefile *
31+ * build- *
32+ * .qm
33+ * .prl
34+
35+ # Qt unit tests
36+ target_wrapper. *
37+
38+ # QtCreator
39+ * .autosave
40+
41+ # QtCreator Qml
42+ * .qmlproject.user
43+ * .qmlproject.user. *
44+
45+ # QtCreator CMake
46+ CMakeLists.txt.user *
47+
48+ # QtCreator 4.8< compilation database
49+ compile_commands.json
50+
51+ # QtCreator local machine specific files for imported projects
52+ * creator.user *
53+
54+ * _qmlcache.qrc
55+
56+ # debian
57+ debian /* debhelper *
58+ debian /files
59+ debian /libgio-qt /
60+ debian /libgio-qt-dev /
61+ debian /libgio-qt-doc /
62+ debian /tmp /
63+ debian /* .substvars
64+ obj- *
Original file line number Diff line number Diff line change 1- project (gio-qt)
2-
31cmake_minimum_required (VERSION 3.12.4 )
42
3+ project (gio-qt)
4+
55option (BUILD_TESTS "Build tests" OFF )
66option (BUILD_UTILS "Build utilities" ON )
77option (BUILD_DOCS "Build documentation" ON )
@@ -29,17 +29,9 @@ endif ()
2929
3030include (GNUInstallDirs )
3131
32- # Find the QtWidgets library
33- find_package (Qt5 ${QT_MINIMUM_VERSION} CONFIG REQUIRED Core )
34- find_package (PkgConfig REQUIRED )
35- find_package (Doxygen )
36-
37- pkg_check_modules (GIOMM giomm-2.4 ) # look into FindPkgConfig.cmake
38-
39- add_subdirectory (gio-qt )
32+ add_subdirectory (gio-qt )
4033
4134if (BUILD_TESTS)
42- find_package (Qt5 ${QT_MINIMUM_VERSION} CONFIG REQUIRED Test )
4335 add_subdirectory (test )
4436endif ()
4537
@@ -48,6 +40,7 @@ if (BUILD_UTILS)
4840endif ()
4941
5042if (BUILD_DOCS)
43+ find_package (Doxygen )
5144 if (NOT DOXYGEN_FOUND)
5245 message (FATAL_ERROR "Doxygen is required to build the documentation." )
5346 endif ()
@@ -70,7 +63,6 @@ if (BUILD_DOCS)
7063 )
7164
7265 install (FILES ${CMAKE_CURRENT_BINARY_DIR} /docs/gio-qt.qch DESTINATION share/qt5/doc)
73-
7466else ()
7567 message (STATUS "" )
7668 message (STATUS "To build docs, please use -DBUILD_DOCS=Yes" )
Original file line number Diff line number Diff line change 1- 9
1+ 11
Original file line number Diff line number Diff line change @@ -3,14 +3,15 @@ Section: libs
33Priority: optional
44Maintainer: Gary Wang <wzc782970009@gmail.com>
55Build-Depends:
6- debhelper (>= 9 ),
6+ debhelper (>= 11 ),
77 cmake,
88 pkg-config,
99 qtbase5-dev,
10- qt5-qmake,
10+ qttools5-dev-tools,
11+ qt6-base-dev,
12+ qt6-tools-dev-tools,
1113 libglibmm-2.4-dev,
12- doxygen,
13- qttools5-dev-tools
14+ doxygen
1415Standards-Version: 3.9.8
1516Homepage: https://github.com/linuxdeepin/gio-qt
1617
@@ -20,18 +21,18 @@ Conflicts: libgio-qt0
2021Replaces: libgio-qt0
2122Depends: ${shlibs:Depends}, ${misc:Depends}, libglibmm-2.4-1v5
2223Description: Gio wrapper for Qt.
23- A convenient way to bind gio with Qt5.
24+ A convenient way to bind gio with either Qt5 or Qt6 .
2425
2526Package: libgio-qt-dev
2627Architecture: any
2728Section: libdevel
2829Depends: libgio-qt, ${misc:Depends}, libglibmm-2.4-dev
2930Description: Development package for libgio-qt.
30- A convenient way to bind gio with Qt5.
31+ A convenient way to bind gio with either Qt5 or Qt6 .
3132
3233Package: libgio-qt-doc
3334Architecture: any
3435Section: doc
3536Depends: ${misc:Depends}
3637Description: Gio wrapper for Qt (documentation)
37- A convenient way to bind gio with Qt5.
38+ A convenient way to bind gio with either Qt5 or Qt6 .
Original file line number Diff line number Diff line change 11# Populate a CMake variable with the sources
22# TODO: portable headers?
33
4- configure_file ("gio-qt.pc.in" "gio-qt.pc" @ONLY )
4+ find_package (PkgConfig REQUIRED )
5+
6+ pkg_check_modules (GIOMM giomm-2.4 ) # look into FindPkgConfig.cmake
57
68set (QGIO_PUBLIC_HEADER_FILES
79 include/dglibutils.h
@@ -34,40 +36,9 @@ set (QGIO_PRIVATE_CPP_FILES
3436 private/dgiohelper.cpp
3537)
3638
37- # Library
38- add_library (gio-qt SHARED
39- ${QGIO_PUBLIC_HEADER_FILES}
40- ${QGIO_PRIVATE_HEADER_FILES}
41- ${QGIO_PRIVATE_CPP_FILES}
42- )
43-
44- set_target_properties (
45- gio-qt PROPERTIES
46- VERSION ${PROJECT_VERSION}
47- SOVERSION ${PROJECT_VERSION_MAJOR}
48- )
49-
50- target_include_directories (gio-qt
51- PRIVATE
52- ${GIOMM_INCLUDE_DIRS}
53- ${CMAKE_CURRENT_LIST_DIR} /private
54- PUBLIC
55- ${CMAKE_CURRENT_LIST_DIR} /include
56- )
57-
58- target_link_libraries (gio-qt Qt5::Core ${GIOMM_LIBRARIES} )
59-
60- target_compile_definitions (gio-qt PRIVATE
61- QT_NO_KEYWORDS
62- )
39+ include (qt6.cmake )
40+ include (qt5.cmake )
6341
64- ## dev files
6542install (FILES ${QGIO_PUBLIC_HEADER_FILES}
6643 DESTINATION include/gio-qt
6744)
68-
69- install_targets ("/${CMAKE_INSTALL_LIBDIR} " gio-qt )
70-
71- install (FILES "${CMAKE_CURRENT_BINARY_DIR} /gio-qt.pc"
72- DESTINATION ${CMAKE_INSTALL_LIBDIR} /pkgconfig
73- )
Original file line number Diff line number Diff line change 1+ prefix=@CMAKE_INSTALL_PREFIX@
2+ exec_prefix=@CMAKE_INSTALL_PREFIX@
3+ libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
4+ includedir=${prefix}/include
5+
6+ Name: gio-qt6
7+ Description: Qt wrapper library for GIO.
8+ Version: @PROJECT_VERSION@
9+ Requires: glibmm-2.4, Qt6Core
10+
11+ Libs: -L${libdir} -lgio-qt6
12+ Cflags: -I${includedir} -I${includedir}/gio-qt
Original file line number Diff line number Diff line change 88#include < QObject>
99#include < QSharedData>
1010
11+ #include < limits.h>
12+
1113namespace Gio {
1214class File ;
1315}
Original file line number Diff line number Diff line change 1+ # Find the QtWidgets library
2+ find_package (Qt5 ${QT_MINIMUM_VERSION} CONFIG REQUIRED Core )
3+
4+ # Library
5+ add_library (${PROJECT_NAME} _qt5 SHARED
6+ ${QGIO_PUBLIC_HEADER_FILES}
7+ ${QGIO_PRIVATE_HEADER_FILES}
8+ ${QGIO_PRIVATE_CPP_FILES}
9+ )
10+
11+ set_target_properties (
12+ ${PROJECT_NAME} _qt5 PROPERTIES
13+ OUTPUT_NAME gio-qt
14+ VERSION ${PROJECT_VERSION}
15+ SOVERSION ${PROJECT_VERSION_MAJOR}
16+ )
17+
18+ target_include_directories (${PROJECT_NAME} _qt5
19+ PRIVATE
20+ ${GIOMM_INCLUDE_DIRS}
21+ ${CMAKE_CURRENT_LIST_DIR} /private
22+ PUBLIC
23+ ${CMAKE_CURRENT_LIST_DIR} /include
24+ Qt5::Core
25+ )
26+
27+ target_link_libraries (${PROJECT_NAME} _qt5 Qt5::Core ${GIOMM_LIBRARIES} )
28+
29+ target_compile_definitions (${PROJECT_NAME} _qt5 PRIVATE
30+ QT_NO_KEYWORDS
31+ )
32+
33+ install (TARGETS ${PROJECT_NAME} _qt5 DESTINATION ${CMAKE_INSTALL_LIBDIR} )
34+
35+ ## dev files
36+ configure_file ("gio-qt.pc.in" "gio-qt.pc" @ONLY )
37+ install (FILES "${CMAKE_CURRENT_BINARY_DIR} /gio-qt.pc"
38+ DESTINATION ${CMAKE_INSTALL_LIBDIR} /pkgconfig
39+ )
Original file line number Diff line number Diff line change 1+ # Find the QtWidgets library
2+ find_package (Qt6 REQUIRED COMPONENTS Core )
3+
4+ # Library
5+ add_library (${PROJECT_NAME} _qt6 SHARED
6+ ${QGIO_PUBLIC_HEADER_FILES}
7+ ${QGIO_PRIVATE_HEADER_FILES}
8+ ${QGIO_PRIVATE_CPP_FILES}
9+ )
10+
11+ set_target_properties (
12+ ${PROJECT_NAME} _qt6 PROPERTIES
13+ OUTPUT_NAME gio-qt6
14+ VERSION ${PROJECT_VERSION}
15+ SOVERSION ${PROJECT_VERSION_MAJOR}
16+ )
17+
18+ target_include_directories (${PROJECT_NAME} _qt6
19+ PRIVATE
20+ ${GIOMM_INCLUDE_DIRS}
21+ ${CMAKE_CURRENT_LIST_DIR} /private
22+ PUBLIC
23+ ${CMAKE_CURRENT_LIST_DIR} /include
24+ Qt6::Core
25+ )
26+
27+ target_link_libraries (${PROJECT_NAME} _qt6 Qt6::Core ${GIOMM_LIBRARIES} )
28+
29+ target_compile_definitions (${PROJECT_NAME} _qt6 PRIVATE
30+ QT_NO_KEYWORDS
31+ )
32+
33+ install (TARGETS ${PROJECT_NAME} _qt6 DESTINATION ${CMAKE_INSTALL_LIBDIR} )
34+
35+ ## dev files
36+ configure_file ("gio-qt6.pc.in" "gio-qt6.pc" @ONLY )
37+ install (FILES "${CMAKE_CURRENT_BINARY_DIR} /gio-qt6.pc"
38+ DESTINATION ${CMAKE_INSTALL_LIBDIR} /pkgconfig
39+ )
Original file line number Diff line number Diff line change 11# QXdgDesktopEntryTest
2- add_executable (qgio-tools
3- main.cpp
4- )
52
6- target_link_libraries (qgio-tools gio-qt )
3+ include (qt6.cmake )
4+ include (qt5.cmake )
You can’t perform that action at this time.
0 commit comments