From ede8655660554aee9dfe905771c035b7941a9be0 Mon Sep 17 00:00:00 2001 From: Jon Jenssen Date: Tue, 26 Aug 2025 16:24:18 +0200 Subject: [PATCH] CMake fixes for open vds enable flag, make sure definition is set in all sub-projects where needed --- ApplicationExeCode/CMakeLists.txt | 4 ++++ ApplicationLibCode/CMakeLists.txt | 1 + ApplicationLibCode/Commands/CMakeLists.txt | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/ApplicationExeCode/CMakeLists.txt b/ApplicationExeCode/CMakeLists.txt index 4cb81e3172..e9b2b28675 100644 --- a/ApplicationExeCode/CMakeLists.txt +++ b/ApplicationExeCode/CMakeLists.txt @@ -226,6 +226,10 @@ if(RESINSIGHT_USE_ODB_API) list(APPEND LINK_LIBRARIES RifOdbReader) endif() +if(RESINSIGHT_ENABLE_OPENVDS) + add_definitions(-DUSE_OPENVDS) +endif() + target_link_libraries(ResInsight PRIVATE ${LINK_LIBRARIES}) if(UNIX AND NOT APPLE) diff --git a/ApplicationLibCode/CMakeLists.txt b/ApplicationLibCode/CMakeLists.txt index bf7389e501..211d9556e5 100644 --- a/ApplicationLibCode/CMakeLists.txt +++ b/ApplicationLibCode/CMakeLists.txt @@ -172,6 +172,7 @@ endif() # OpenVDS # if(RESINSIGHT_ENABLE_OPENVDS) + message(STATUS "OpenVDS support enabled") add_definitions(-DUSE_OPENVDS) list(APPEND RI_PRIVATE_INCLUDES ${RESINSIGHT_OPENVDS_API_DIR}/include) diff --git a/ApplicationLibCode/Commands/CMakeLists.txt b/ApplicationLibCode/Commands/CMakeLists.txt index 0923c1aef6..4cbbaaf7bb 100644 --- a/ApplicationLibCode/Commands/CMakeLists.txt +++ b/ApplicationLibCode/Commands/CMakeLists.txt @@ -79,6 +79,10 @@ add_library( ${COMMAND_MOC_SOURCE_FILES} ) +if(RESINSIGHT_ENABLE_OPENVDS) + add_definitions(-DUSE_OPENVDS) +endif() + if(RESINSIGHT_ENABLE_PRECOMPILED_HEADERS) message("Precompiled Headers is enabled on : ${PROJECT_NAME}") target_precompile_headers(Commands PRIVATE pch.h)