diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a4864f4..0b1afb43 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -936,19 +936,6 @@ else() set_target_properties(dracodec_unity PROPERTIES BUNDLE true) set_target_properties(dracoenc_unity PROPERTIES BUNDLE true) endif() - if(WIN32 AND ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore") - # Ignoring Error C4146 unary minus operator applied to unsigned type, - # result still unsigned - target_compile_options(draco_compression_attributes_enc PRIVATE "/wd4146") - target_compile_options(draco_compression_bit_coders PRIVATE "/wd4146") - target_compile_options(draco_compression_entropy PRIVATE "/wd4146") - target_compile_options(draco_compression_mesh_dec PRIVATE "/wd4146") - target_compile_options(draco_compression_mesh_enc PRIVATE "/wd4146") - target_compile_options(draco_core PRIVATE "/wd4146") - target_compile_options(draco_io PRIVATE "/wd4146") - target_compile_options(draco_metadata_dec PRIVATE "/wd4146") - target_compile_options(draco_metadata_enc PRIVATE "/wd4146") - endif() endif() if(DRACO_MAYA_PLUGIN) diff --git a/cmake/draco_build_definitions.cmake b/cmake/draco_build_definitions.cmake index 778b273b..6aa5af4c 100644 --- a/cmake/draco_build_definitions.cmake +++ b/cmake/draco_build_definitions.cmake @@ -126,5 +126,11 @@ macro(draco_set_build_definitions) list(APPEND draco_base_cxx_flags "-fembed-bitcode") endif() + if(WIN32 AND ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore") + # Ignoring Error C4146 unary minus operator applied to unsigned type, result + # still unsigned + list(APPEND draco_msvc_cxx_flags "/wd4146") + endif() + draco_configure_sanitizer() endmacro()