From 3eb4044d349e73128e62fcd598ad0dc77a130c31 Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Mon, 24 Oct 2016 22:28:25 -0400 Subject: [PATCH] fix windows build --- cmake/xlnt.cmake | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cmake/xlnt.cmake b/cmake/xlnt.cmake index 71b04dcf..e6bacde8 100644 --- a/cmake/xlnt.cmake +++ b/cmake/xlnt.cmake @@ -78,13 +78,8 @@ if(SHARED) add_library(xlnt.shared SHARED ${HEADERS} ${SOURCES} ${MINIZ} ${LIBSTUDXML} ${POLE} ${BOTAN}) target_compile_definitions(xlnt.shared PRIVATE XLNT_SHARED=1 LIBSTUDXML_STATIC_LIB=1) if(MSVC) - target_compile_definitions(xlnt.shared PRIVATE XLNT_EXPORT=1 _CRT_SECURE_NO_WARNINGS=1) + target_compile_definitions(xlnt.shared PRIVATE XLNT_EXPORT=1 _CRT_SECURE_NO_WARNINGS=1 NOMINMAX) set_target_properties(xlnt.shared PROPERTIES COMPILE_FLAGS "/wd\"4251\" /wd\"4275\"") - if(WITH_CRYPTO) - set_target_properties(xlnt.shared PROPERTIES COMPILE_FLAGS "/wd\"4250\" /wd\"4251\" /wd\"4275\"") - else() - set_target_properties(xlnt.shared PROPERTIES COMPILE_FLAGS "/wd\"4251\" /wd\"4275\"") - endif() endif() install(TARGETS xlnt.shared LIBRARY DESTINATION ${LIB_DEST_DIR} @@ -118,7 +113,7 @@ if(STATIC) target_compile_definitions(xlnt.static PUBLIC XLNT_STATIC=1) target_compile_definitions(xlnt.static PRIVATE LIBSTUDXML_STATIC_LIB=1) if(MSVC) - target_compile_definitions(xlnt.static PRIVATE _CRT_SECURE_NO_WARNINGS=1) + target_compile_definitions(xlnt.static PRIVATE _CRT_SECURE_NO_WARNINGS=1 NOMINMAX) endif() install(TARGETS xlnt.static LIBRARY DESTINATION ${LIB_DEST_DIR}