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>2020-09-15 17:00:15 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-09-17 13:29:19 +0300
commitf9fcb25d521d11b425e1071a95ed342d9ddbef97 (patch)
treee3c2a12097b774d607a3bd61c4f3c1ecd3a26cba /source/blender
parent0700c045bc7fb2ec996e04a60eed24f338559924 (diff)
CMake: clean up setting of platform specific linker flags
Set flags directly on the target, and use common function for all cases. This refactoring helps with the next commit for test executables. Ref D8714
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenlib/tests/performance/CMakeLists.txt3
-rw-r--r--source/blender/blentranslation/msgfmt/CMakeLists.txt5
-rw-r--r--source/blender/datatoc/CMakeLists.txt2
-rw-r--r--source/blender/makesdna/intern/CMakeLists.txt2
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt2
5 files changed, 4 insertions, 10 deletions
diff --git a/source/blender/blenlib/tests/performance/CMakeLists.txt b/source/blender/blenlib/tests/performance/CMakeLists.txt
index 88fbed0a49b..5342dbe286c 100644
--- a/source/blender/blenlib/tests/performance/CMakeLists.txt
+++ b/source/blender/blenlib/tests/performance/CMakeLists.txt
@@ -26,8 +26,5 @@ set(INC
setup_libdirs()
include_directories(${INC})
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
-set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
-
BLENDER_TEST_PERFORMANCE(BLI_ghash_performance "bf_blenlib")
BLENDER_TEST_PERFORMANCE(BLI_task_performance "bf_blenlib")
diff --git a/source/blender/blentranslation/msgfmt/CMakeLists.txt b/source/blender/blentranslation/msgfmt/CMakeLists.txt
index 350473fa195..20f5053bd29 100644
--- a/source/blender/blentranslation/msgfmt/CMakeLists.txt
+++ b/source/blender/blentranslation/msgfmt/CMakeLists.txt
@@ -33,15 +33,12 @@ set(SRC
setup_libdirs()
add_cc_flags_custom_test(msgfmt)
-if(APPLE)
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
-endif()
-
if(WIN32)
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /nodefaultlib:MSVCRT.lib")
endif()
add_executable(msgfmt ${SRC})
+setup_platform_linker_flags(msgfmt)
target_link_libraries(msgfmt bf_blenlib)
target_link_libraries(msgfmt bf_intern_guardedalloc)
diff --git a/source/blender/datatoc/CMakeLists.txt b/source/blender/datatoc/CMakeLists.txt
index b750edd044e..3253db2314d 100644
--- a/source/blender/datatoc/CMakeLists.txt
+++ b/source/blender/datatoc/CMakeLists.txt
@@ -34,7 +34,7 @@ if(NOT WITH_HEADLESS)
set(SRC
datatoc_icon.c
)
- setup_platform_linker_flags()
+ setup_platform_linker_flags(datatoc)
if(WIN32)
include_directories(
../blenlib
diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt
index 9808740e030..e902474deb1 100644
--- a/source/blender/makesdna/intern/CMakeLists.txt
+++ b/source/blender/makesdna/intern/CMakeLists.txt
@@ -56,9 +56,9 @@ endif()
# SRC_DNA_INC is defined in the parent dir
add_cc_flags_custom_test(makesdna)
-setup_platform_linker_flags()
add_executable(makesdna ${SRC} ${SRC_DNA_INC})
+setup_platform_linker_flags(makesdna)
if(WIN32 AND NOT UNIX)
target_link_libraries(makesdna ${PTHREADS_LIBRARIES})
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 976035b9886..386777db739 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -386,9 +386,9 @@ blender_include_dirs(
)
add_cc_flags_custom_test(makesrna)
-setup_platform_linker_flags()
add_executable(makesrna ${SRC} ${SRC_RNA_INC} ${SRC_DNA_INC})
+setup_platform_linker_flags(makesrna)
target_link_libraries(makesrna bf_dna)
target_link_libraries(makesrna bf_dna_blenlib)