From 36888fd009ce3085b2ad15890041c451dd895f63 Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Thu, 15 Apr 2021 11:09:04 +0200 Subject: [PATCH] cmake option to dont build all bundled external libraries --- src/CMakeLists.txt | 3 ++- src/external/CMakeLists.txt | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5e3d1ad11..1e1815f97 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,6 +9,7 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) ### Build options +option(ALLOW_BUNDLED_EXTERNAL_MESHLAB_LIBRARIES "Allow to build bundled external libraries sources" ON) option(BUILD_MINI "Build only a minimal set of plugins" OFF) option(BUILD_SERVER "Build a command-line server application" OFF) option(BUILD_STRICT "Strictly enforce resolution of all symbols" ON) @@ -112,7 +113,7 @@ endif() # External set(EXTERNAL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external) include(${EXTERNAL_DIR}/external_common.cmake) -if(NOT BUILD_MINI) +if((NOT BUILD_MINI) AND (ALLOW_BUNDLED_EXTERNAL_MESHLAB_LIBRARIES)) add_subdirectory(${EXTERNAL_DIR}) endif() diff --git a/src/external/CMakeLists.txt b/src/external/CMakeLists.txt index 0b0cd46cb..970b890be 100644 --- a/src/external/CMakeLists.txt +++ b/src/external/CMakeLists.txt @@ -2,7 +2,5 @@ # Copyright 2019, 2020, Visual Computing Lab, ISTI - Italian National Research Council # SPDX-License-Identifier: BSL-1.0 -if(NOT BUILD_MINI) - message(STATUS "Searching for optional components") - include(${EXTERNAL_DIR}/external.cmake) -endif() +message(STATUS "Searching for optional components") +include(${EXTERNAL_DIR}/external.cmake)