Hello,
I am trying to compile the wireframe example using Cmake. I am able to to get a good build using the CMakeLists.txt below. However, when I run the executable I get the an error associate with the loading of plugins. It appears that the executable is looking for the plugins in an other application (gleamviz)?? Is there a way to point Qt in the right direction for the plugins in the CMakeLists.txt?
Error message:
[reuben@reuben-mba build]$ ./gui/eema_gui
qrc:/main.qml:51:1: plugin cannot be loaded for module "QtQuick": Cannot load library /Applications/GLEAMviz-5/gleamviz.app/Contents/Frameworks/qml/QtQuick.2/libqtquick2plugin.dylib: (dlopen(/Applications/GLEAMviz-5/gleamviz.app/Contents/Frameworks/qml/QtQuick.2/libqtquick2plugin.dylib, 133): Library not loaded: @executable_path/../Frameworks/QtQuick.framework/Versions/5/QtQuick
Referenced from: /Applications/GLEAMviz-5/gleamviz.app/Contents/Frameworks/qml/QtQuick.2/libqtquick2plugin.dylib
Reason: image not found)
[reuben@reuben-mba build]$
CMakeLists.txt:
# configure Qt
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
find_package(Qt5 COMPONENTS Core Quick QML 3DQuickExtras QuickControls2 REQUIRED)
foreach(plugin ${Qt5Core_PLUGINS})
get_target_property(_loc ${plugin} LOCATION)
message("Plugin ${plugin} is at location ${_loc}")
endforeach()
# add the qml.qrc file
qt5_add_resources(qml_QRC wireframe.qrc)
file(GLOB_RECURSE CODE_FILES *.cpp)
add_executable(eema_gui
${CODE_FILES}
${qml_QRC}
)
target_link_libraries(eema_gui Qt5::Core Qt5::Qml Qt5::Quick Qt5::3DQuickExtras Qt5::QuickControls2)
Bookmarks