diff --git a/cmake/FlagsSummary.cmake b/cmake/FlagsSummary.cmake index a9719f9280..bbc18ece9d 100644 --- a/cmake/FlagsSummary.cmake +++ b/cmake/FlagsSummary.cmake @@ -30,7 +30,8 @@ function(print_flags_per_config config indent_num) indent_message("C compiler flags ......................" "${c_compiler_flags}" ${indent_num}) if(BUILD_SHARED_LIBS) - string(STRIP "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_${config_uppercase}}" linker_flags) + string(STRIP "${CMAKE_SHARED_LIBRARY_C_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}" linker_flags) + string(STRIP "${linker_flags} ${CMAKE_SHARED_LINKER_FLAGS_${config_uppercase}}" linker_flags) if(NOT MSVC) string(STRIP "${c_language_flags} ${linker_flags}" linker_flags) endif()