Skip to content

Commit

Permalink
fix: Simplified iOS C++ flag settings
Browse files Browse the repository at this point in the history
  • Loading branch information
atteneder committed May 14, 2021
1 parent 9e709a0 commit 1256969
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 24 deletions.
24 changes: 0 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -936,30 +936,6 @@ else()
set_target_properties(dracodec_unity PROPERTIES BUNDLE true)
set_target_properties(dracoenc_unity PROPERTIES BUNDLE true)
endif()
if(IOS)
# Workaround to ensure bitcode is generated when generating an iOS library
# with Makefiles as generator.
target_compile_options(dracodec_unity PUBLIC -fembed-bitcode)
target_compile_options(draco_attributes PUBLIC -fembed-bitcode)
target_compile_options(draco_compression_attributes_dec
PUBLIC -fembed-bitcode)
target_compile_options(draco_compression_bit_coders
PUBLIC -fembed-bitcode)
target_compile_options(draco_compression_decode PUBLIC -fembed-bitcode)
target_compile_options(draco_compression_entropy PUBLIC -fembed-bitcode)
target_compile_options(draco_compression_mesh_dec PUBLIC -fembed-bitcode)
target_compile_options(draco_compression_point_cloud_dec
PUBLIC -fembed-bitcode)
target_compile_options(draco_core PUBLIC -fembed-bitcode)
target_compile_options(draco_dec_config PUBLIC -fembed-bitcode)
target_compile_options(draco_io PUBLIC -fembed-bitcode)
target_compile_options(draco_mesh PUBLIC -fembed-bitcode)
target_compile_options(draco_metadata PUBLIC -fembed-bitcode)
target_compile_options(draco_metadata_dec PUBLIC -fembed-bitcode)
target_compile_options(draco_point_cloud PUBLIC -fembed-bitcode)
target_compile_options(draco_points_dec PUBLIC -fembed-bitcode)
target_compile_options(draco_unity_plugin PUBLIC -fembed-bitcode)
endif()
if(WIN32 AND ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore")
# Ignoring Error C4146 unary minus operator applied to unsigned type,
# result still unsigned
Expand Down
6 changes: 6 additions & 0 deletions cmake/draco_build_definitions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,11 @@ macro(draco_set_build_definitions)
draco_get_required_emscripten_flags(FLAG_LIST_VAR draco_base_cxx_flags)
endif()

if(IOS)
# ensure bitcode is generated when generating an iOS library with Makefiles
# as generator.
list(APPEND draco_base_cxx_flags "-fembed-bitcode")
endif()

draco_configure_sanitizer()
endmacro()

0 comments on commit 1256969

Please sign in to comment.