diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2020-05-29 12:13:56 +0200 |
---|---|---|
committer | Cristian Adam <cristian.adam@gmail.com> | 2020-05-29 13:18:44 +0200 |
commit | 6fbb74cc47202b05a961bf8825a6bd17815b8874 (patch) | |
tree | 91d9e0b3da63990d839160925e154db65458db7c | |
parent | e70fe083f3eb6a3bc63937e147a2997bb908f67a (diff) |
CMake Build: Ensure right suffix and prefixes for modules / plugins
Same procedure as Qt Base's modules / plugins.
Change-Id: I0fa86c2d137ba1abdd5c156f435d078e4f56ac8d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r-- | src/qml/Qt6QmlMacros.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qml/Qt6QmlMacros.cmake b/src/qml/Qt6QmlMacros.cmake index be163fde59..9671712bd3 100644 --- a/src/qml/Qt6QmlMacros.cmake +++ b/src/qml/Qt6QmlMacros.cmake @@ -145,6 +145,15 @@ function(qt6_add_qml_module target) else() add_library(${target} MODULE) set(is_static FALSE) + if(APPLE) + # CMake defaults to using .so extensions for loadable modules, aka plugins, + # but Qt plugins are actually suffixed with .dylib. + set_property(TARGET "${target}" PROPERTY SUFFIX ".dylib") + endif() + if(WIN32) + # CMake sets for Windows-GNU platforms the suffix "lib" + set_property(TARGET "${target}" PROPERTY PREFIX "") + endif() endif() endif() |