diff --git a/CMakeLists.txt b/CMakeLists.txt index 975a259eb756f5d2e33863f99c1736d0cb92284a..4b934063aee84d3fe68643209d3ec47eb0ab1c55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,6 +75,18 @@ if(COMPILE_QML) ) endif() +#============================================================================= +# Debug QML +# +option(DEBUG_QML "Build QGroundControl with QML debugging/profiling support." FALSE) +add_feature_info(DEBUG_QML DEBUG_QML "Build QGroundControl with QML debugging/profiling support.") +if(DEBUG_QML) + message(STATUS "To enable the QML debugger/profiler, run with: '-qmljsdebugger=port:1234'") + add_definitions(-DQMLJSDEBUGGER) + add_definitions(-DQT_DECLARATIVE_DEBUG) + add_definitions(-DQT_QML_DEBUG) +endif() + #============================================================================= # GStreamer #