From 9b298cf3dbec9e246748448cc635a5055fe90c19 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 14 Mar 2022 16:39:42 +0100 Subject: RNA: Generate property declerations header, solving msg-bus C++ incompatibility Lets `makesrna` generate a `RNA_prototypes.h` header with declarations for all RNA properties. This can be included in regular source files when needing to reference RNA properties statically. This solves an issue on MSVC with adding such declarations in functions, like we used to do. See 800fc1736748. Removes any such declarations and the related FIXME comments. Reviewed By: campbellbarton, LazyDodo, brecht Differential Revision: https://developer.blender.org/D13837 --- source/blender/makesrna/intern/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna/intern/CMakeLists.txt') diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index a0e5fc282d2..4e3a4aae727 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -122,6 +122,7 @@ set(APISRC string(REGEX REPLACE "rna_([a-zA-Z0-9_-]*).c" "${CMAKE_CURRENT_BINARY_DIR}/rna_\\1_gen.c" GENSRC "${DEFSRC}") list(APPEND GENSRC "${CMAKE_CURRENT_BINARY_DIR}/rna_prototypes_gen.h" + "${CMAKE_CURRENT_BINARY_DIR}/../RNA_prototypes.h" ) set_source_files_properties(${GENSRC} PROPERTIES GENERATED TRUE) @@ -188,6 +189,8 @@ set(INC # dna_type_offsets.h ${CMAKE_CURRENT_BINARY_DIR}/../../makesdna/intern + # RNA_prototypes.h + ${CMAKE_CURRENT_BINARY_DIR}/../../makesrna/ ) set(INC_SYS @@ -402,7 +405,7 @@ endif() # note (linux only): with crashes try add this after COMMAND: valgrind --leak-check=full --track-origins=yes add_custom_command( OUTPUT ${GENSRC} - COMMAND "$" ${CMAKE_CURRENT_BINARY_DIR}/ + COMMAND "$" ${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/../ DEPENDS makesrna ) -- cgit v1.2.3