Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2022-09-18 08:41:13 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-09-18 12:26:34 +0300
commit0ffd288fab5686f55d68d0d39baf59568f4389e7 (patch)
treec92e584c1a4d417f437b41cb85638ed37e4d1255 /source/blender/makesdna
parent6bf5cc62e0901175d98506216932ec6ffd4506a5 (diff)
Build: fix gtest build flags affecting actual library
Switch to target_ functions to avoid this.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/intern/CMakeLists.txt42
1 files changed, 22 insertions, 20 deletions
diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt
index 97198117a83..0d04d7df067 100644
--- a/source/blender/makesdna/intern/CMakeLists.txt
+++ b/source/blender/makesdna/intern/CMakeLists.txt
@@ -3,6 +3,22 @@
# message(STATUS "Configuring makesdna")
+set(INC
+ ..
+ ../../blenlib
+ ../../imbuf
+ ../../../../intern/atomic
+ ../../../../intern/guardedalloc
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+set(INC_SYS
+
+)
+
+set(LIB
+)
+
add_definitions(-DWITH_DNA_GHASH)
# Needed for `mallocn.c`.
@@ -10,14 +26,6 @@ if(HAVE_MALLOC_STATS_H)
add_definitions(-DHAVE_MALLOC_STATS_H)
endif()
-blender_include_dirs(
- ../../../../intern/atomic
- ../../../../intern/guardedalloc
- ../../blenlib
- ../../imbuf
- ..
-)
-
set(dna_header_include_file "${CMAKE_CURRENT_BINARY_DIR}/dna_includes_all.h")
set(dna_header_string_file "${CMAKE_CURRENT_BINARY_DIR}/dna_includes_as_strings.h")
@@ -57,6 +65,8 @@ add_cc_flags_custom_test(makesdna)
add_executable(makesdna ${SRC} ${SRC_DNA_INC})
setup_platform_linker_flags(makesdna)
+blender_target_include_dirs(makesdna ${INC})
+blender_target_include_dirs_sys(makesdna ${INC_SYS})
if(WIN32 AND NOT UNIX)
target_link_libraries(makesdna ${PTHREADS_LIBRARIES})
@@ -80,14 +90,6 @@ add_custom_command(
# -----------------------------------------------------------------------------
# Build bf_dna library
-set(INC
- ${CMAKE_CURRENT_BINARY_DIR}
-)
-
-set(INC_SYS
-
-)
-
set(SRC
dna_defaults.c
dna_genfile.c
@@ -101,9 +103,6 @@ set(SRC
dna_utils.h
)
-set(LIB
-)
-
set_source_files_properties(
${CMAKE_CURRENT_BINARY_DIR}/dna.c
${CMAKE_CURRENT_BINARY_DIR}/dna_type_offsets.h
@@ -117,7 +116,10 @@ blender_add_lib(bf_dna "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
# -----------------------------------------------------------------------------
# Build bf_dna_blenlib library
set(INC
-
+ ../../blenlib
+ ../../makesdna
+ ../../../../intern/atomic
+ ../../../../intern/guardedalloc
)
set(INC_SYS