Skip to content

Commit

Permalink
Fix MSVC CMake bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
syoyo committed Dec 5, 2023
1 parent 6b0ba82 commit 21ca575
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -845,11 +845,11 @@ foreach(TINYUSDZ_LIB_TARGET ${TINYUSDZ_LIBS})
# Although TinyUSDZ should compile well without /bigobj flag,
# corrent TinyYSDZ need to use bigobj format otherwise we'll get: fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj
if(MSVC)
target_compile_options(tinyusdz_object PRIVATE /bigobj)
target_compile_options(${TINYUSDZ_LIB_TARGET} PRIVATE /bigobj)
elseif(WIN32)
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
# guess mingw-gcc
target_compile_options(tinyusdz_object PRIVATE "-Wa, -mbig-obj")
target_compile_options(${TINYUSDZ_LIB_TARGET} PRIVATE "-Wa, -mbig-obj")
endif()
endif()

Expand Down

0 comments on commit 21ca575

Please sign in to comment.