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 /build_files/cmake/Modules
parent6bf5cc62e0901175d98506216932ec6ffd4506a5 (diff)
Build: fix gtest build flags affecting actual library
Switch to target_ functions to avoid this.
Diffstat (limited to 'build_files/cmake/Modules')
-rw-r--r--build_files/cmake/Modules/GTestTesting.cmake6
1 files changed, 2 insertions, 4 deletions
diff --git a/build_files/cmake/Modules/GTestTesting.cmake b/build_files/cmake/Modules/GTestTesting.cmake
index 92ce403d5f3..5ffd158361e 100644
--- a/build_files/cmake/Modules/GTestTesting.cmake
+++ b/build_files/cmake/Modules/GTestTesting.cmake
@@ -40,12 +40,10 @@ macro(BLENDER_SRC_GTEST_EX)
set(MANIFEST "${CMAKE_BINARY_DIR}/tests.exe.manifest")
endif()
- add_definitions(-DBLENDER_GFLAGS_NAMESPACE=${GFLAGS_NAMESPACE})
- add_definitions(${GFLAGS_DEFINES})
- add_definitions(${GLOG_DEFINES})
-
add_executable(${TARGET_NAME} ${ARG_SRC} ${MANIFEST})
setup_platform_linker_flags(${TARGET_NAME})
+ target_compile_definitions(${TARGET_NAME} PRIVATE ${GFLAGS_DEFINES})
+ target_compile_definitions(${TARGET_NAME} PRIVATE ${GLOG_DEFINES})
target_include_directories(${TARGET_NAME} PUBLIC "${TEST_INC}")
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC "${TEST_INC_SYS}")
target_link_libraries(${TARGET_NAME} ${ARG_EXTRA_LIBS} ${PLATFORM_LINKLIBS})