Skip to content

Commit

Permalink
Fix all warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
herzenschein committed Nov 13, 2023
1 parent 16ab151 commit bf907ae
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 6 deletions.
18 changes: 18 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 3.25)
project(minimal-qml6-examples)

add_subdirectory(qml5-contextproperty)
add_subdirectory(qml5-portaldialog)
add_subdirectory(qml5-singletoninstance)
add_subdirectory(qml5-singletontype)

option(BUILD_QMLCONAN OFF)
if(BUILD_QMLCONAN)
add_subdirectory(qml6-conan)
endif()

add_subdirectory(qml6-portaldialog)
add_subdirectory(qml6-pragmasingleton)
add_subdirectory(qml6-qmlelement)
add_subdirectory(qml6-singleton)
add_subdirectory(qml6-subdirectories)
1 change: 1 addition & 0 deletions qml5-singletoninstance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ qt_add_executable(${PROJECT_NAME}
qt_add_qml_module(${PROJECT_NAME}
URI "Main"
VERSION 1.0
RESOURCE_PREFIX "/"
QML_FILES
"main.qml"
"SetDialog.qml"
Expand Down
1 change: 1 addition & 0 deletions qml5-singletontype/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ qt_add_executable(${PROJECT_NAME}
qt_add_qml_module(${PROJECT_NAME}
URI "Main"
VERSION 1.0
RESOURCE_PREFIX "/"
QML_FILES
"main.qml"
"SetDialog.qml"
Expand Down
1 change: 1 addition & 0 deletions qml6-conan/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ qt_add_executable(${PROJECT_NAME}
qt_add_qml_module(${PROJECT_NAME}
URI "conan"
VERSION 1.0
RESOURCE_PREFIX "/"
QML_FILES "main.qml"
)

Expand Down
13 changes: 7 additions & 6 deletions qml6-portaldialog/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@ find_package(Qt6 REQUIRED COMPONENTS Quick Widgets)
qt_standard_project_setup()

add_executable(${PROJECT_NAME}
"main.cpp"
"main.cpp"
)

qt_add_qml_module(${PROJECT_NAME}
URI "portaldialog"
VERSION 1.0
QML_FILES "main.qml"
URI "portaldialog"
VERSION 1.0
RESOURCE_PREFIX "/"
QML_FILES "main.qml"
)

target_link_libraries(${PROJECT_NAME} PRIVATE
Qt6::Quick
Qt6::Widgets
Qt6::Quick
Qt6::Widgets
)

include(GNUInstallDirs)
Expand Down
1 change: 1 addition & 0 deletions qml6-pragmasingleton/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ set_source_files_properties(PragmaSingleton.qml PROPERTIES QT_QML_SINGLETON_TYPE
qt_add_qml_module(${PROJECT_NAME}
URI "PragmaSingletonExample"
VERSION 1.0
RESOURCE_PREFIX "/"
QML_FILES
"main.qml"
"SetDialog.qml"
Expand Down
3 changes: 3 additions & 0 deletions qml6-qmlelement/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ project(qml6-qmlelement LANGUAGES CXX)

find_package(Qt6 REQUIRED COMPONENTS Quick Qml)

cmake_policy(SET CMP0071 NEW)

qt_standard_project_setup()

qt_add_executable(${PROJECT_NAME}
Expand All @@ -15,6 +17,7 @@ qt_add_executable(${PROJECT_NAME}
qt_add_qml_module(${PROJECT_NAME}
URI "QmlFromCpp"
VERSION 1.0
RESOURCE_PREFIX "/"
QML_FILES
"main.qml"
SOURCES
Expand Down
3 changes: 3 additions & 0 deletions qml6-singleton/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ qt_add_executable(${PROJECT_NAME}
qt_add_qml_module(${PROJECT_NAME}
URI "SingletonExample"
VERSION 1.0
RESOURCE_PREFIX "/"
QML_FILES
"main.qml"
"SetDialog.qml"
Expand All @@ -36,6 +37,8 @@ qt_add_qml_module(${PROJECT_NAME}
qt_add_qml_module(singleton # This automatically creates a singletonplugin target.
URI "SingletonImport"
VERSION 1.0
RESOURCE_PREFIX "/"
OUTPUT_DIRECTORY "SingletonImport"
SOURCES
"singleton.cpp"
"singleton.hpp"
Expand Down
1 change: 1 addition & 0 deletions qml6-subdirectories/sub1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
qt_add_qml_module(main
URI "Main"
VERSION 1.0
RESOURCE_PREFIX "/"
# OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/qml
# OUTPUT_DIRECTORY "Main"
QML_FILES "main.qml"
Expand Down
1 change: 1 addition & 0 deletions qml6-subdirectories/sub1/sub2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ qt_add_library(textrow STATIC)
qt_add_qml_module(textrow
URI "TextRow"
VERSION 1.0
RESOURCE_PREFIX "/"
# OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/qml
# OUTPUT_DIRECTORY "TextRow"
QML_FILES "TextRow.qml"
Expand Down
1 change: 1 addition & 0 deletions qml6-subdirectories/sub1/sub2/sub3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ target_sources(${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/strings.hpp
qt_add_qml_module(strings
URI "Strings"
VERSION 1.0
RESOURCE_PREFIX "/"
# OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/qml
# OUTPUT_DIRECTORY "Strings"
SOURCES "strings.hpp"
Expand Down

0 comments on commit bf907ae

Please sign in to comment.