Manipulate library names on Windows + Clang

This commit is contained in:
Vittorio Romeo 2021-12-21 17:32:27 +01:00 committed by Lukas Dürrenberger
parent c824d3d57a
commit 46639ed277

View File

@ -102,8 +102,8 @@ macro(sfml_add_library target)
else() else()
set_target_properties(${target} PROPERTIES DEBUG_POSTFIX -d) set_target_properties(${target} PROPERTIES DEBUG_POSTFIX -d)
endif() endif()
if (SFML_OS_WINDOWS AND SFML_COMPILER_GCC) if (SFML_OS_WINDOWS AND (SFML_COMPILER_GCC OR SFML_COMPILER_CLANG))
# on Windows/gcc get rid of "lib" prefix for shared libraries, # on Windows + gcc/clang get rid of "lib" prefix for shared libraries,
# and transform the ".dll.a" suffix into ".a" for import libraries # and transform the ".dll.a" suffix into ".a" for import libraries
set_target_properties(${target} PROPERTIES PREFIX "") set_target_properties(${target} PROPERTIES PREFIX "")
set_target_properties(${target} PROPERTIES IMPORT_SUFFIX ".a") set_target_properties(${target} PROPERTIES IMPORT_SUFFIX ".a")