Commit 43c570b7 authored by Ghislain MARY's avatar Ghislain MARY

Fix build of libxml2 with Visual Studio 2015.

parent 687fdf61
......@@ -354,7 +354,11 @@ else()
endif()
endif()
if(MSVC)
target_compile_definitions(xml2 PRIVATE "snprintf=_snprintf")
string(REPLACE " " ";" GENERATOR_LIST "${CMAKE_GENERATOR}")
list(GET GENERATOR_LIST 2 VS_VERSION)
if(VS_VERSION LESS "14")
target_compile_definitions(xml2 PRIVATE "snprintf=_snprintf")
endif()
elseif(NOT APPLE)
set_target_properties(xml2 PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libxml2.syms")
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment