sofa-framework / sofa

Real-time multi-physics simulation with an emphasis on medical simulation.
https://www.sofa-framework.org
GNU Lesser General Public License v2.1
871 stars 297 forks source link

[CMake] Start finding Qt6 then Qt5 #4686

Closed hugtalbot closed 4 days ago

hugtalbot commented 3 weeks ago

As discussed in the SOFA dev meeting, prefer now using Qt6 over Qt5. Therefore, look firstly for Qt6 before Qt5.


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

fredroy commented 2 weeks ago

I think you also need to modify the following part:

# Will only use Qt6 if Qt6 is found and Qt5 is not found
# if Qt5 and Qt6 are both found, Qt5 will take priority
# Qt6 needs cmake >= 3.16, https://doc.qt.io/qt-6/cmake-get-started.html 
find_package(Qt5 COMPONENTS Core QUIET)
if (NOT Qt5Core_FOUND)
    if(${CMAKE_VERSION} VERSION_GREATER "3.16.0")
        find_package(Qt6 COMPONENTS Core CoreTools QUIET)
    endif()
endif()

not only that .... 🙈

fredroy commented 2 weeks ago

https://github.com/hugtalbot/sofa/pull/111

fredroy commented 2 weeks ago

[ci-build][with-all-tests]