Commit Graph

9 Commits

Author SHA1 Message Date
Stefan 1e8c851283 chore(CPP): Basic project configuration setup using Qt6
Considerations

- Use versioned files. Versioned Qt CMake APIs are disabled to force explicit calls and say that we don't support older `QT`s
- Don't use blobbing. Use `target_sources` and `qt_target_qml_sources`
- Distribute `CMake` definitions closer to the context: main folders with their own `CMakeLists.txt`
- Everything in libraries under `Status` namespace for cleaner code.
- Includes are exposed with Module folder externally and without prefix internally
- File/Folders name matches definitions they contain for uniformity that leads to cleaner code
- All source files (cpp, qml, js ...) have to be added to one of the CMakeLists.txt files to be tracked by CMake build system.
- Use BUILD_DEBUG, BUILD_RELEASE and BUILD_DEVELOPMENT variables from Helpers library
- Avoid Include directories. Not needed anymore CMake `target_*` APIs handles this through `INTERFACE`, `PUBLIC` and `PRIVATE` scope identifiers
- `StatusQ` is meant to be compiled as an external library, therefore StatusQ tests are kept inside its own directory
- Forced CMake version to `3.21` for the latest features and fixes. It is desired to be kept as recent as possible due to its backward compatibility. Following Qt's shipped version might be an option
- Depends on status-go changes to allow forcing of arm for apple silicon

Found limitations to CMake Qt API with Qt 6.3

- Having `0` as major version when using `qt_add_qml_module` doesn't work. Qml engine reports loading the `qmldir` but won't load the plugin library and no error is reported outside that exposed types are not found.
- `qt_target_qml_sources` doesn't work now, it generate a double copy error when deploying qml files in bin-directory. For now we stick with adding files using `qt_add_qml_module` central place
  - Need to add `OUTPUT_DIRECTORY` to `qt_add_qml_module` to use the workaround
- If `MACOSX_BUNDLE` target property is set breaks importing of QML files. Disabled until fixed or workaround found
- For an unknown reason application executable tries to include the `QML_ELEMENT` include files, therefore for now I include all the C++ qml elements in INTERFACE
2022-06-30 12:16:33 +02:00
Patryk Osmaczko c0024ec6b1 refactor(@desktop/cpp): improve cpp code
Good coding practices applied only,
architecture and logic were not altered.
2022-03-01 16:05:21 +01:00
Khushboo-dev-cpp 036d8491fb Update CMakeLists.txt 2022-02-14 10:27:22 +01:00
Khushboo Mehta 9aa9101bbe fix: Add a min cmake version for the cpp app so that the user is prompted to install the latest cmake version instead of getting an ambiguous error 2022-02-14 10:27:22 +01:00
Anthony Laibe 56340bebd1 chores(@general): remove status-lib deps 2022-02-03 11:52:45 -05:00
Richard Ramos bf6dbe4815 fix: docs and remove redundant -binary option for rcc 2022-02-01 15:48:54 -04:00
Richard Ramos 80505eb592 fix: resources.rcc Release 2022-02-01 15:48:54 -04:00
Patryk Osmaczko e98428dd40 feat(@desktop/cpp): add conanfile, fruit, gtest
Closes: #4428
Closes: #4429
2022-02-01 15:48:54 -04:00
Richard Ramos 4183069a9f feat: base_cpp 2022-02-01 15:48:54 -04:00