diff --git a/scripts/Linux/1_build.sh b/scripts/Linux/1_build.sh index 92a339bb9..5c0f92f6f 100644 --- a/scripts/Linux/1_build.sh +++ b/scripts/Linux/1_build.sh @@ -39,7 +39,7 @@ case $i in shift # past argument=value ;; -d|--double_precision) - DOUBLE_PRECISION_OPTION="-DBUILD_WITH_DOUBLE_SCALAR=ON" + DOUBLE_PRECISION_OPTION="-DMESHLAB_BUILD_WITH_DOUBLE_SCALAR=ON" shift # past argument=value ;; -n|--nightly) diff --git a/scripts/Windows/1_build.sh b/scripts/Windows/1_build.sh index 09eab2a93..b541d27b4 100644 --- a/scripts/Windows/1_build.sh +++ b/scripts/Windows/1_build.sh @@ -34,7 +34,7 @@ case $i in shift # past argument=value ;; -d|--double_precision) - DOUBLE_PRECISION_OPTION="-DBUILD_WITH_DOUBLE_SCALAR=ON" + DOUBLE_PRECISION_OPTION="-DMESHLAB_BUILD_WITH_DOUBLE_SCALAR=ON" shift # past argument=value ;; -n|--nightly) diff --git a/scripts/macOS/1_build.sh b/scripts/macOS/1_build.sh index a616e9b1f..2236189a9 100644 --- a/scripts/macOS/1_build.sh +++ b/scripts/macOS/1_build.sh @@ -40,7 +40,7 @@ case $i in shift # past argument=value ;; -d|--double_precision) - DOUBLE_PRECISION_OPTION="-DBUILD_WITH_DOUBLE_SCALAR=ON" + DOUBLE_PRECISION_OPTION="-DMESHLAB_BUILD_WITH_DOUBLE_SCALAR=ON" shift # past argument=value ;; -n|--nightly) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 33a53453f..53417670a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,13 +6,13 @@ cmake_minimum_required(VERSION 3.18) project(MeshLab) ### Build options -option(BUILD_MESHLAB_MINI "Build only common and meshlab - other plugin targets must be set manually" OFF) -option(BUILD_STRICT "Strictly enforce resolution of all symbols" ON) -option(BUILD_WITH_DOUBLE_SCALAR "Use double type instead of float type for scalars" OFF) -option(ENABLE_MESHLAB_DEBUG_LOG_FILE "If enabled, all the logs of MeshLab will be also saved into a log file" OFF) +option(MESHLAB_BUILD_MINI "Build only common and meshlab - other plugin targets must be set manually" OFF) +option(MESHLAB_BUILD_STRICT "Strictly enforce resolution of all symbols" ON) +option(MESHLAB_BUILD_WITH_DOUBLE_SCALAR "Use double type instead of float type for scalars" OFF) +option(MESHLAB_ENABLE_DEBUG_LOG_FILE "If enabled, all the logs of MeshLab will be also saved into a log file" OFF) -option(BUILD_ONLY_MESHLAB_LIBRARIES "Build only meshlab-common and plugins" OFF) -option(USE_DEFAULT_BUILD_AND_INSTALL_DIRS "If set to OFF, it expects that you set manually the binary and install directories" ON) +option(MESHLAB_BUILD_ONLY_LIBRARIES "Build only meshlab-common and plugins, excluding executables" OFF) +option(MESHLAB_USE_DEFAULT_BUILD_AND_INSTALL_DIRS "If set to OFF, it expects that you set manually the binary and install directories" ON) option(MESHLAB_IS_NIGHTLY_VERSION "Nightly version of meshlab will be used instead of ML_VERSION" OFF) @@ -41,7 +41,7 @@ find_package(Eigen3) set(MESHLAB_RESOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../resources) ### Build directories -if (USE_DEFAULT_BUILD_AND_INSTALL_DIRS) # otherwise, we assume that all these dirs are defined in parent dir +if (MESHLAB_USE_DEFAULT_BUILD_AND_INSTALL_DIRS) # otherwise, we assume that all these dirs are defined in parent dir set(MESHLAB_BUILD_DISTRIB_DIR ${CMAKE_CURRENT_BINARY_DIR}/distrib) set(MESHLAB_LIB_OUTPUT_DIR ${MESHLAB_BUILD_DISTRIB_DIR}) set(MESHLAB_PLUGIN_OUTPUT_DIR ${MESHLAB_BUILD_DISTRIB_DIR}/plugins) @@ -119,7 +119,7 @@ add_subdirectory(${EXTERNAL_DIR}) add_subdirectory(common) -if (NOT BUILD_ONLY_MESHLAB_LIBRARIES) +if (NOT MESHLAB_BUILD_ONLY_LIBRARIES) add_subdirectory(meshlab) if(WIN32 AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/use_cpu_opengl") add_subdirectory(use_cpu_opengl) @@ -231,7 +231,7 @@ endforeach() # This variable keeps track of the output filenames that need to be copied at build time set(COPIED_FILES) -if (NOT BUILD_ONLY_MESHLAB_LIBRARIES) +if (NOT MESHLAB_BUILD_ONLY_LIBRARIES) # shaders set(SHADER_BASE_DIR "${MESHLAB_RESOURCES_DIR}/shaders") file( diff --git a/src/cmake/meshlab_global_settings.cmake b/src/cmake/meshlab_global_settings.cmake index 6f7960ec3..096c2450d 100644 --- a/src/cmake/meshlab_global_settings.cmake +++ b/src/cmake/meshlab_global_settings.cmake @@ -38,7 +38,7 @@ if(APPLE) add_definitions(-DGL_SILENCE_DEPRECATION) endif() -if(BUILD_STRICT AND NOT MSVC AND NOT APPLE) +if(MESHLAB_BUILD_STRICT AND NOT MSVC AND NOT APPLE) # Make sure that our shared libraries were appropriately linked set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined") diff --git a/src/cmake/meshlab_tools.cmake b/src/cmake/meshlab_tools.cmake index 626b39981..4df1f2d4d 100644 --- a/src/cmake/meshlab_tools.cmake +++ b/src/cmake/meshlab_tools.cmake @@ -5,7 +5,7 @@ #function used to add plugins function(add_meshlab_plugin target_name) set(EXCLUDE_ALL_ARG "") - if (BUILD_MESHLAB_MINI) + if (MESHLAB_BUILD_MINI) set(EXCLUDE_ALL_ARG "EXCLUDE_FROM_ALL") endif() diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 4ca84cb64..73f864870 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -20,7 +20,7 @@ else() endif() endif() -if (BUILD_WITH_DOUBLE_SCALAR) +if (MESHLAB_BUILD_WITH_DOUBLE_SCALAR) set(MESHLAB_VERSION "${MESHLAB_VERSION}d") endif() @@ -32,7 +32,7 @@ else() message(STATUS "MeshLab version: ${MESHLAB_VERSION}") endif() -if (BUILD_WITH_DOUBLE_SCALAR) +if (MESHLAB_BUILD_WITH_DOUBLE_SCALAR) message(STATUS "Building with double precision") set(MESHLAB_SCALAR "double") else() @@ -175,7 +175,7 @@ if (WIN32) PROPERTY ARCHIVE_OUTPUT_DIRECTORY ${MESHLAB_LIB_OUTPUT_DIR}) endif() -if(ENABLE_MESHLAB_DEBUG_LOG_FILE) +if(MESHLAB_ENABLE_DEBUG_LOG_FILE) target_compile_definitions(meshlab-common PUBLIC MESHLAB_LOG_FILE_ENABLED) endif() diff --git a/src/external/CMakeLists.txt b/src/external/CMakeLists.txt index 0fc87d487..50d9a19a8 100644 --- a/src/external/CMakeLists.txt +++ b/src/external/CMakeLists.txt @@ -3,20 +3,20 @@ # SPDX-License-Identifier: BSL-1.0 option( - ALLOW_OPTIONAL_EXTERNAL_MESHLAB_LIBRARIES + MESHLAB_ALLOW_OPTIONAL_EXTERNAL_LIBRARIES "Allow to use/build optional external libraries" ON) option( - BUILD_BUNDLED_SOURCES_WITHOUT_WARNINGS - "Should warnings be disabled on bundled source code?" + MESHLAB_BUILD_EXTERNAL_SOURCES_WITHOUT_WARNINGS + "Should warnings be disabled on external libraries code?" ON) set(MESHLAB_EXTERNAL_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/downloads") set(MESHLAB_EXTERNAL_DOWNLOAD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/downloads") add_library(external-disable-warnings INTERFACE) -if(BUILD_BUNDLED_SOURCES_WITHOUT_WARNINGS) +if(MESHLAB_BUILD_EXTERNAL_SOURCES_WITHOUT_WARNINGS) if(MSVC) # TODO elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") @@ -35,7 +35,7 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/easyexif.cmake) ## OPTIONAL EXTERNAL LIBS ## -if ((NOT BUILD_MESHLAB_MINI) AND ALLOW_OPTIONAL_EXTERNAL_MESHLAB_LIBRARIES) +if ((NOT MESHLAB_BUILD_MINI) AND MESHLAB_ALLOW_OPTIONAL_EXTERNAL_LIBRARIES) message(STATUS "Searching for optional components")