From bf43070b8e8b46b4307b52d5a4d90e02cbb0630c Mon Sep 17 00:00:00 2001 From: Masterkatze Date: Mon, 27 Nov 2023 04:01:28 +0300 Subject: [PATCH] Fix PURE_DYNAMIC_CAST-related build issue --- CMakeLists.txt | 3 +++ src/Layers/xrRenderPC_GL/CMakeLists.txt | 1 + src/xrEngine/CMakeLists.txt | 1 + src/xrPhysics/CMakeLists.txt | 1 + src/xrUICore/CMakeLists.txt | 1 + 5 files changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 340313d7b50..9d0098d2b4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,6 +89,9 @@ if (STATIC_BUILD) endif() message(STATUS "STATIC_BUILD: ${STATIC_BUILD}") +option(CMAKE_UNITY_BUILD "Use unity build" OFF) +message(STATUS "CMAKE_UNITY_BUILD: ${CMAKE_UNITY_BUILD}") + find_program(CCACHE_FOUND ccache) if (CCACHE_FOUND) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) diff --git a/src/Layers/xrRenderPC_GL/CMakeLists.txt b/src/Layers/xrRenderPC_GL/CMakeLists.txt index 46e03537f1a..7e6ca92ee11 100644 --- a/src/Layers/xrRenderPC_GL/CMakeLists.txt +++ b/src/Layers/xrRenderPC_GL/CMakeLists.txt @@ -415,6 +415,7 @@ target_compile_definitions(xrRender_GL PRIVATE XRRENDER_GL_EXPORTS USE_OGL + PURE_DYNAMIC_CAST ) set_target_properties(xrRender_GL PROPERTIES diff --git a/src/xrEngine/CMakeLists.txt b/src/xrEngine/CMakeLists.txt index 6e3649ec5e0..eca685c6821 100644 --- a/src/xrEngine/CMakeLists.txt +++ b/src/xrEngine/CMakeLists.txt @@ -455,6 +455,7 @@ target_link_libraries(xrEngine target_compile_definitions(xrEngine PRIVATE ENGINE_BUILD + PURE_DYNAMIC_CAST ) set_target_properties(xrEngine PROPERTIES diff --git a/src/xrPhysics/CMakeLists.txt b/src/xrPhysics/CMakeLists.txt index 24e8093eff7..c46cc9ac55d 100644 --- a/src/xrPhysics/CMakeLists.txt +++ b/src/xrPhysics/CMakeLists.txt @@ -417,6 +417,7 @@ target_link_libraries(xrPhysics target_compile_definitions(xrPhysics PRIVATE XRPHYSICS_EXPORTS + PURE_DYNAMIC_CAST ) set_target_properties(xrPhysics PROPERTIES diff --git a/src/xrUICore/CMakeLists.txt b/src/xrUICore/CMakeLists.txt index 372912018de..c3c63a5390d 100644 --- a/src/xrUICore/CMakeLists.txt +++ b/src/xrUICore/CMakeLists.txt @@ -159,6 +159,7 @@ endif() target_compile_definitions(xrUICore PRIVATE XRUICORE_EXPORTS + PURE_DYNAMIC_CAST ) set_target_properties(xrUICore PROPERTIES