From 92d6ea825bba0942ed89092e13ded21851acb208 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Sun, 8 Mar 2015 06:48:45 +1100 Subject: Added CMake option to enable QML debugging --- heimdall-frontend/CMakeLists.txt | 4 ++++ heimdall-frontend/source/main.cpp | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/heimdall-frontend/CMakeLists.txt b/heimdall-frontend/CMakeLists.txt index 7cf87fe..dd68fcf 100644 --- a/heimdall-frontend/CMakeLists.txt +++ b/heimdall-frontend/CMakeLists.txt @@ -19,6 +19,10 @@ if(MINGW) set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static") endif(MINGW) +if(ENABLE_QML_DEBUGGING) + add_definitions(-DENABLE_QML_DEBUGGING) +endif(ENABLE_QML_DEBUGGING) + include_directories(${LIBPIT_INCLUDE_DIRS}) set(HEIMDALL_FRONTEND_SOURCE_FILES diff --git a/heimdall-frontend/source/main.cpp b/heimdall-frontend/source/main.cpp index 6373006..53e9f2d 100644 --- a/heimdall-frontend/source/main.cpp +++ b/heimdall-frontend/source/main.cpp @@ -30,6 +30,11 @@ Q_IMPORT_PLUGIN (QWindowsIntegrationPlugin); #endif +#if defined(ENABLE_QML_DEBUGGING) +#include +QQmlDebuggingEnabler enabler; +#endif + using namespace HeimdallFrontend; int main(int argc, char *argv[]) -- cgit v1.2.3