From 0ffd288fab5686f55d68d0d39baf59568f4389e7 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 18 Sep 2022 07:41:13 +0200 Subject: Build: fix gtest build flags affecting actual library Switch to target_ functions to avoid this. --- .../blender/blentranslation/msgfmt/CMakeLists.txt | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'source/blender/blentranslation/msgfmt/CMakeLists.txt') diff --git a/source/blender/blentranslation/msgfmt/CMakeLists.txt b/source/blender/blentranslation/msgfmt/CMakeLists.txt index 7b95bf210d7..dce3f0014f0 100644 --- a/source/blender/blentranslation/msgfmt/CMakeLists.txt +++ b/source/blender/blentranslation/msgfmt/CMakeLists.txt @@ -4,7 +4,7 @@ # ----------------------------------------------------------------------------- # Build msgfmt executable -blender_include_dirs( +set(INC ../../../../intern/guardedalloc ../../blenlib ) @@ -13,21 +13,20 @@ set(SRC msgfmt.c ) +set(LIB + bf_blenlib + bf_intern_guardedalloc + ${ZLIB_LIBRARIES} + ${PLATFORM_LINKLIBS}) + add_cc_flags_custom_test(msgfmt) if(WIN32) string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG " /nodefaultlib:MSVCRT.lib") + list(APPEND LIB bf_intern_utfconv) endif() add_executable(msgfmt ${SRC}) setup_platform_linker_flags(msgfmt) - -target_link_libraries(msgfmt bf_blenlib) -target_link_libraries(msgfmt bf_intern_guardedalloc) - -if(WIN32) - target_link_libraries(msgfmt bf_intern_utfconv) -endif() - -target_link_libraries(msgfmt ${ZLIB_LIBRARIES}) -target_link_libraries(msgfmt ${PLATFORM_LINKLIBS}) +blender_target_include_dirs(msgfmt ${INC}) +target_link_libraries(msgfmt ${LIB}) -- cgit v1.2.3