diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-09-15 17:00:15 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-09-17 13:29:19 +0300 |
commit | f9fcb25d521d11b425e1071a95ed342d9ddbef97 (patch) | |
tree | e3c2a12097b774d607a3bd61c4f3c1ecd3a26cba /source/creator/CMakeLists.txt | |
parent | 0700c045bc7fb2ec996e04a60eed24f338559924 (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/creator/CMakeLists.txt')
-rw-r--r-- | source/creator/CMakeLists.txt | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 43f77556ba1..ae672aa3b5c 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -256,13 +256,7 @@ if(WITH_PYTHON_MODULE) ) if(APPLE) - set_target_properties( - blender - PROPERTIES - MACOSX_BUNDLE TRUE - LINK_FLAGS_RELEASE "${PLATFORM_LINKFLAGS}" - LINK_FLAGS_DEBUG "${PLATFORM_LINKFLAGS_DEBUG}" - ) + set_target_properties(blender PROPERTIES MACOSX_BUNDLE TRUE) endif() if(WIN32) @@ -1127,7 +1121,8 @@ add_dependencies(blender makesdna) target_link_libraries(blender ${LIB}) unset(LIB) -setup_liblinks(blender) +setup_platform_linker_flags(blender) +setup_platform_linker_libs(blender) if(APPLE) set_target_properties(blender PROPERTIES LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/osx_locals.map) @@ -1162,9 +1157,9 @@ if(WIN32) # CMAKE_BUILD_TYPE. This can be simplified by target_link_options and the $<CONFIG> # generator expression in newer cmake (2.13+) but until that time this fill have suffice. if(CMAKE_BUILD_TYPE) - set_property(TARGET blender APPEND PROPERTY LINK_FLAGS " /PDBSTRIPPED:${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/blender_public.pdb") + set_property(TARGET blender APPEND_STRING PROPERTY LINK_FLAGS " /PDBSTRIPPED:${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/blender_public.pdb") else() - set_property(TARGET blender APPEND PROPERTY LINK_FLAGS " /PDBSTRIPPED:${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/blender_public.pdb") + set_property(TARGET blender APPEND_STRING PROPERTY LINK_FLAGS " /PDBSTRIPPED:${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/blender_public.pdb") endif() endif() endif() |