summaryrefslogtreecommitdiffstats
path: root/examples/sensors/grue/console_app/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sensors/grue/console_app/CMakeLists.txt')
-rw-r--r--examples/sensors/grue/console_app/CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/sensors/grue/console_app/CMakeLists.txt b/examples/sensors/grue/console_app/CMakeLists.txt
index e6364e48..69a3f68c 100644
--- a/examples/sensors/grue/console_app/CMakeLists.txt
+++ b/examples/sensors/grue/console_app/CMakeLists.txt
@@ -24,11 +24,24 @@ set_target_properties(detect_grue PROPERTIES
WIN32_EXECUTABLE FALSE
MACOSX_BUNDLE FALSE
)
+
+if(WIN32)
+ set_target_properties(detect_grue PROPERTIES
+ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/..
+ )
+endif()
+
target_link_libraries(detect_grue PUBLIC
Qt::Core
Qt::Sensors
)
+# Need to link to the plugin manually in a static Qt build.
+if(NOT QT6_IS_SHARED_LIBS_BUILD)
+ target_link_libraries(detect_grue PRIVATE qtsensors_grue)
+ target_sources(detect_grue PRIVATE ../grue_plugin_import_custom.cpp)
+endif()
+
install(TARGETS detect_grue
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"