Link legacy_stdio_definitions.lib on MSVC -- fixes linker errors for sprintf() & Co.
This commit is contained in:
parent
53ee8d39aa
commit
a61d471451
|
@ -117,6 +117,12 @@ elseif(SFML_OS_IOS)
|
|||
target_link_libraries(sfml-graphics PRIVATE z bz2)
|
||||
endif()
|
||||
|
||||
# on newer MSVC versions, inline versions of some C functions are used; for compatibility link this library
|
||||
# see https://docs.microsoft.com/en-us/cpp/porting/overview-of-potential-upgrade-issues-visual-cpp?view=msvc-160#libraries
|
||||
if(SFML_COMPILER_MSVC)
|
||||
target_link_libraries(sfml-graphics PRIVATE legacy_stdio_definitions.lib)
|
||||
endif()
|
||||
|
||||
sfml_find_package(Freetype INCLUDE "FREETYPE_INCLUDE_DIRS" LINK "FREETYPE_LIBRARY")
|
||||
target_link_libraries(sfml-graphics PRIVATE Freetype)
|
||||
|
||||
|
|
Loading…
Reference in a new issue