- 
    
Bug
 - 
    Resolution: Invalid
 - 
    
P2: Important
 - 
    None
 - 
    6.0.0 Alpha
 - 
    None
 
We tried our cmake based application against Qt6. It seems Qt5_POSITION_INDEPENDENT_CODE is not defined anymore. It is always false this is never defined in Qt5CoreMacros.cmake
  
        if (Qt5_POSITION_INDEPENDENT_CODE
            AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
                OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0))
            set_property(TARGET ${_target} PROPERTY POSITION_INDEPENDENT_CODE ${Qt5_POSITION_INDEPENDENT_CODE})
        endif()
 
Also it looks like there is no interface compile option anymore.
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_OPTIONS -fPIC)
So we get a lot of this errors. Qt5 works fine.
/.../qt6/include/QtCore/qglobal.h:1228:4: Fehler: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (and not with -fPIE)." error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\