Browse Source

Add a cmake option to enable/disable Helper

This option is useful for remote debugging on embedded PMP as deployment will always try to deploy the helper and debugger will never stop it.
longchair 7 years ago
parent
commit
68010a7a9c
2 changed files with 7 additions and 1 deletions
  1. 5 0
      CMakeLists.txt
  2. 2 1
      src/main.cpp

+ 5 - 0
CMakeLists.txt

@@ -30,6 +30,11 @@ if(BUILD_TARGET STREQUAL "RPI")
   Message(STATUS "Build for Raspberry PI target")
 endif(BUILD_TARGET STREQUAL "RPI")
 
+option(ENABLE_HELPER "Enable PMP Helper" ON)
+if (ENABLE_HELPER)
+  add_definitions(-DENABLE_HELPER=1)
+endif(ENABLE_HELPER)
+
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
 set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME Core)

+ 2 - 1
src/main.cpp

@@ -173,8 +173,9 @@ int main(int argc, char *argv[])
     QtWebEngine::initialize();
 
     // start our helper
+#if ENABLE_HELPER
     HelperLauncher::Get().connectToHelper();
-
+#endif
     // load QtWebChannel so that we can register our components with it.
     QQmlApplicationEngine *engine = Globals::Engine();