diff --git a/CMakeLists.txt b/CMakeLists.txt index a9b838e71e670416c9314a3a951a2c9dc5ebf7b1..f0e730d441cbd22f440bd01d76c8ccc6fbf20f3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,10 @@ include(GNUInstallDirs) include(CTest) enable_testing() +option(BUILD_VISION "Enable the vision component" ON) +option(BUILD_RECONSTRUCT "Enable the reconstruction component" ON) +option(BUILD_RENDERER "Enable the renderer component" ON) + set(THREADS_PREFER_PTHREAD_FLAG ON) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") @@ -118,10 +122,20 @@ endif() SET(CMAKE_USE_RELATIVE_PATHS ON) add_subdirectory(common/cpp) -add_subdirectory(renderer) add_subdirectory(net) -add_subdirectory(vision) -add_subdirectory(reconstruct) + +if (BUILD_RENDERER) + add_subdirectory(renderer) + set(HAVE_RENDER) +endif() + +if (BUILD_VISION) + add_subdirectory(vision) +endif() + +if (BUILD_RECONSTRUCT) + add_subdirectory(reconstruct) +endif() ### Generate Build Configuration Files ========================================= diff --git a/common/cpp/include/ftl/config.h.in b/common/cpp/include/ftl/config.h.in index 7c128412996648572adbbd5a6a1a625f98ba9fed..34d59cc591aedc090ff78a78f49ea8924d3715ca 100644 --- a/common/cpp/include/ftl/config.h.in +++ b/common/cpp/include/ftl/config.h.in @@ -6,6 +6,7 @@ #cmakedefine HAVE_URIPARSESINGLE #cmakedefine HAVE_CUDA #cmakedefine HAVE_OPENCV +#cmakedefine HAVE_RENDER extern const char *FTL_VERSION_LONG; extern const char *FTL_VERSION;