cmake build with qt6 (macos) does not include "plugins"

pdv pdvisschere at edpnet.be
Mon Mar 20 19:05:32 UTC 2023


On 20/03/2023 10:50, Kornel Benko wrote:
> Am Sun, 19 Mar 2023 20:45:55 +0100
> schrieb pdv <pdvisschere at edpnet.be>:
> 
>> The merge branch killqt4 (commit 9376... on nov 28) broke the cmake
>> install build on macos.
>>
>> The "development/cmake/post_install/CMakeLists.txt' SCRIPT checks for
>> qt5 and copies all plugins if different. This did work for qt4 but also
>> for qt6.
>>
>> The killqt4 branch removed this else part for qt4 but also for qt6.
>>
>> The included patch restores this else clause and only the comment has
>> been adapted (qt6 instead of qt4).
>>
>> Since I don't know which plugins are actually needed I copied them all.
>>
>> Regards,
>>
>> P. De Visschere
> 
> But your patch is inside of
> 	if(LYX_BUNDLE)
> 		if(Qt5Core_FOUND
> and outside of
> 	 if(APPLE)
> 
> so I wonder, why is it working for QT6?
> 
> Maybe the attached is what you want?
> 
> 	Kornel
> 
> 
It's within the first if() else(), that's thus for qt6(see below). I 
suppose this should work for all platforms, but I checked it on macos 
only. Your patch is limited to APPLE and also works for me; If this 
problem doesn't occur for other platforms, it's ok for me of course.


>     if(Qt5Core_FOUND)
> 	file(GLOB QT_PLUGIN_DIRECTORIES "${QT_PLUGINS_DIR}/imageformats")
> 	install(DIRECTORY ${QT_PLUGIN_DIRECTORIES} DESTINATION "${qtplugin_dest_dir}/plugins/" COMPONENT Runtime REGEX "\\_debug\\.dylib$" EXCLUDE)
>        if(APPLE)
> 		if(Qt5Core_VERSION VERSION_GREATER_EQUAL 5.10.0)
>        			install_qt_plugin("Qt5::QMacStylePlugin")
>        		endif()
>         install_qt_plugin("Qt5::QCocoaIntegrationPlugin")
>        endif()
>     else()
>         # With QT6, just copy all the plugins
>         file(GLOB QT_PLUGIN_DIRECTORIES "${QT_PLUGINS_DIR}/*")
>         install(DIRECTORY ${QT_PLUGIN_DIRECTORIES} DESTINATION "${qtplugin_dest_dir}/plugins/" COMPONENT Runtime)
>     endif()



More information about the lyx-devel mailing list