From e598ab5dd5fcb76b749aa40a503b9bb2e9ae0552 Mon Sep 17 00:00:00 2001 From: Mathieu Westphal Date: Tue, 3 Sep 2024 23:05:43 +0200 Subject: [PATCH] App: Fix an issue with define in F3DConfig (#1602) --- application/CMakeLists.txt | 15 +++++++++++++++ application/F3DConfig.h.in | 6 ------ application/F3DConfigFileTools.cxx | 1 - application/F3DOptionsTools.h | 2 -- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt index 4dec6867b0..be09595465 100644 --- a/application/CMakeLists.txt +++ b/application/CMakeLists.txt @@ -91,6 +91,21 @@ set(f3d_link_options_public "") # splitting input positional option by commas target_compile_definitions(f3d PRIVATE "CXXOPTS_VECTOR_DELIMITER='\\0'") +# macOS bundle +if (F3D_MACOS_BUNDLE) + target_compile_definitions(f3d PRIVATE F3D_MACOS_BUNDLE) +endif () + +# raytracing +if (F3D_MODULE_RAYTRACING) + target_compile_definitions(f3d PRIVATE F3D_MODULE_RAYTRACING) +endif () + +# exr +if (F3D_MODULE_EXR) + target_compile_definitions(f3d PRIVATE F3D_MODULE_EXR) +endif () + # Headless EGL build if (VTK_OPENGL_HAS_EGL) target_compile_definitions(f3d PRIVATE F3D_HEADLESS_BUILD) diff --git a/application/F3DConfig.h.in b/application/F3DConfig.h.in index fd22136008..1cdbfc33e2 100644 --- a/application/F3DConfig.h.in +++ b/application/F3DConfig.h.in @@ -11,10 +11,4 @@ const std::string AppVersion = "@F3D_VERSION@"; const std::string AppVersionFull = "@F3D_VERSION_FULL@"; const std::string PluginsInstallDir = "@F3D_PLUGINS_INSTALL_DIR@"; } - -// TODO: Use CMake definitions and get rid of these -#cmakedefine01 F3D_MACOS_BUNDLE -#cmakedefine01 F3D_MODULE_RAYTRACING -#cmakedefine01 F3D_MODULE_EXR - #endif diff --git a/application/F3DConfigFileTools.cxx b/application/F3DConfigFileTools.cxx index 12cf787b50..3ec7766f42 100644 --- a/application/F3DConfigFileTools.cxx +++ b/application/F3DConfigFileTools.cxx @@ -1,6 +1,5 @@ #include "F3DConfigFileTools.h" -#include "F3DConfig.h" #include "F3DSystemTools.h" #include "nlohmann/json.hpp" diff --git a/application/F3DOptionsTools.h b/application/F3DOptionsTools.h index 420bce30e1..59e2a16bb8 100644 --- a/application/F3DOptionsTools.h +++ b/application/F3DOptionsTools.h @@ -5,8 +5,6 @@ * @class F3DOptionsTools * @brief A namespace to handle and parse F3D Options */ -#include "F3DConfig.h" - #include #include #include