[Bf-blender-cvs] [7d7090710c7] master: CMake: Fix compilation errors related on missing dna_type_offsets.h

Sergey Sharybin noreply at git.blender.org
Tue Jun 16 12:22:10 CEST 2020


Commit: 7d7090710c717e524d096d31608dfecac93e1009
Author: Sergey Sharybin
Date:   Tue Jun 16 12:20:20 2020 +0200
Branches: master
https://developer.blender.org/rB7d7090710c717e524d096d31608dfecac93e1009

CMake: Fix compilation errors related on missing dna_type_offsets.h

Some of the files were (indirectly) using dna_type_offsets.h without
adding dependency from bf_dna (which is needed to ensure the file is
generated prior to library compilation).

===================================================================

M	source/blender/makesdna/intern/CMakeLists.txt
M	source/blender/makesrna/intern/CMakeLists.txt
M	source/blender/modifiers/CMakeLists.txt

===================================================================

diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt
index 01e3971a216..0f2761e311e 100644
--- a/source/blender/makesdna/intern/CMakeLists.txt
+++ b/source/blender/makesdna/intern/CMakeLists.txt
@@ -96,6 +96,7 @@ set(SRC
   ${CMAKE_CURRENT_BINARY_DIR}/dna_verify.c
   ${SRC_DNA_INC}
 
+  ${CMAKE_CURRENT_BINARY_DIR}/dna_type_offsets.h
   dna_rename_defs.h
   dna_utils.h
 )
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 024bdbe5ed5..dd7f5f684e7 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -443,3 +443,6 @@ set(LIB
 add_definitions(${GL_DEFINITIONS})
 
 blender_add_lib(bf_rna "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
+
+# Needed so we can use dna_type_offsets.h for defaults initialization.
+add_dependencies(bf_blenkernel bf_dna)
diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt
index 460f697a0a9..80a1ebab64e 100644
--- a/source/blender/modifiers/CMakeLists.txt
+++ b/source/blender/modifiers/CMakeLists.txt
@@ -175,3 +175,7 @@ endif()
 add_definitions(${GL_DEFINITIONS})
 
 blender_add_lib(bf_modifiers "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
+
+# Some modifiers include BLO_read_write.h, which includes dna_type_offsets.h
+# which is generated by bf_dna. Need to ensure compilaiton order here.
+add_dependencies(bf_modifiers bf_dna)



More information about the Bf-blender-cvs mailing list