Differences between 6.2 and 6.5. Where to reed about it?
-
Hello all!
Just got installed Qt 6.5.0 and running default application from Qt Creator wizard. There are few changes in default application. Could someone say why it is:
- In default application CMakeLists.txt:
cmake_minimum_required(VERSION 3.16) project(AmneziaMobile VERSION 0.1 LANGUAGES CXX) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt6 6.5 REQUIRED COMPONENTS Quick) qt_standard_project_setup(REQUIRES 6.5) qt_add_executable(appAmneziaMobile main.cpp ) qt_add_qml_module(appAmneziaMobile URI AmneziaMobile VERSION 1.0 QML_FILES Main.qml ) set_target_properties(appAmneziaMobile PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} MACOSX_BUNDLE TRUE WIN32_EXECUTABLE TRUE ) target_link_libraries(appAmneziaMobile PRIVATE Qt6::Quick ) install(TARGETS appAmneziaMobile BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )There are few questions:
-- why added install? In previous version of default application it hasn't been there. Why now?
-- why added MACOSX_BUNDLE parameters? Before it there were nothing about it.
-- before it has contained:find_package(QT NAMES Qt6 Qt5 COMPONENTS ${A_QT_MODULES} REQUIRED) find_package(Qt${QT_VERSION_MAJOR} COMPONENTS ${A_QT_MODULES} REQUIRED) if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) qt_add_executable(${A_NAME_TARGET} ${A_SOURCES} ) else() if(ANDROID) add_library(${A_NAME_TARGET} SHARED ${A_SOURCES} ) else() add_executable(${A_NAME_TARGET} ${A_SOURCES} ) endif() endif()and
target_compile_definitions(${A_NAME_TARGET} PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG> PUBLIC ) target_link_libraries(${A_NAME_TARGET} PRIVATE ${A_QT_MODULE_TARGETS} PUBLIC )What the difference to what is now in Qt CMakeLists.txt? Why all of this code canceled from Default application in wizard?
- Is there any real full manuals about new features of qt for the case of iOS/Android development? For now all of documentation is very brief. Especially about iOS.
-
Hello all!
Just got installed Qt 6.5.0 and running default application from Qt Creator wizard. There are few changes in default application. Could someone say why it is:
- In default application CMakeLists.txt:
cmake_minimum_required(VERSION 3.16) project(AmneziaMobile VERSION 0.1 LANGUAGES CXX) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt6 6.5 REQUIRED COMPONENTS Quick) qt_standard_project_setup(REQUIRES 6.5) qt_add_executable(appAmneziaMobile main.cpp ) qt_add_qml_module(appAmneziaMobile URI AmneziaMobile VERSION 1.0 QML_FILES Main.qml ) set_target_properties(appAmneziaMobile PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} MACOSX_BUNDLE TRUE WIN32_EXECUTABLE TRUE ) target_link_libraries(appAmneziaMobile PRIVATE Qt6::Quick ) install(TARGETS appAmneziaMobile BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )There are few questions:
-- why added install? In previous version of default application it hasn't been there. Why now?
-- why added MACOSX_BUNDLE parameters? Before it there were nothing about it.
-- before it has contained:find_package(QT NAMES Qt6 Qt5 COMPONENTS ${A_QT_MODULES} REQUIRED) find_package(Qt${QT_VERSION_MAJOR} COMPONENTS ${A_QT_MODULES} REQUIRED) if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) qt_add_executable(${A_NAME_TARGET} ${A_SOURCES} ) else() if(ANDROID) add_library(${A_NAME_TARGET} SHARED ${A_SOURCES} ) else() add_executable(${A_NAME_TARGET} ${A_SOURCES} ) endif() endif()and
target_compile_definitions(${A_NAME_TARGET} PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG> PUBLIC ) target_link_libraries(${A_NAME_TARGET} PRIVATE ${A_QT_MODULE_TARGETS} PUBLIC )What the difference to what is now in Qt CMakeLists.txt? Why all of this code canceled from Default application in wizard?
- Is there any real full manuals about new features of qt for the case of iOS/Android development? For now all of documentation is very brief. Especially about iOS.
@bogong said in Differences between 6.2 and 6.5. Where to reed about it?:
-- why added install? In previous version of default application it hasn't been there. Why now?
Because having it the default template is convenient for a lot of people. It's easy enough to delete if you don't want it.
-- why added MACOSX_BUNDLE parameters? Before it there were nothing about it.
Pretty much the same. A lot of people building on MacOS had to add that stuff manually before, so it was more convenient to have it in the default template. IF you aren't building an OSX bundle, it shouldn't effect anything.
You can read the details in the CMake documentation. It's expected that most people will tinker with the CMakeLists.txt, so you can make it do whatever you want.