localtime_r support on MinGW

main
Luis Díaz Más 4 years ago
parent fa4b69e2bc
commit 50d5887e65

@ -41,10 +41,16 @@ target_include_directories(exiv2-xmp
# ("billion laughs attack").
# See https://bugzilla.redhat.com/show_bug.cgi?id=888769
target_compile_definitions(exiv2-xmp PRIVATE BanAllEntityUsage=1)
if (MSVC)
target_compile_definitions(exiv2-xmp PRIVATE XML_STATIC)
endif()
if (MINGW)
# https://stackoverflow.com/questions/18551409/localtime-r-support-on-mingw
target_compile_definitions(exiv2-xmp PRIVATE _POSIX_THREAD_SAFE_FUNCTIONS)
endif()
if (BUILD_SHARED_LIBS)
set_property(TARGET exiv2-xmp PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()

Loading…
Cancel
Save