File tree Expand file tree Collapse file tree
attachments/advanced_gltf Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ FetchContent_Declare(
8080 SOURCE_SUBDIR Build)
8181set (DOUBLE_PRECISION OFF CACHE BOOL "" FORCE )
8282set (GENERATE_DEBUG_SYMBOLS ON CACHE BOOL "" FORCE )
83+ set (PROFILE_ENABLED ON CACHE BOOL "" FORCE )
8384if (MSVC )
8485 set (USE_STATIC_MSVC_RUNTIME_LIBRARY OFF CACHE BOOL "" FORCE )
8586endif ()
@@ -249,7 +250,17 @@ if(MSVC)
249250 NOMINMAX WIN32_LEAN_AND_MEAN _CRT_SECURE_NO_WARNINGS )
250251 target_compile_options (SimpleEngineLib PUBLIC
251252 /permissive- /Zc:__cplusplus /EHsc /W3 /MP /bigobj )
253+ # Force use of the advanced renderer header to avoid shadowing issues with simple_engine/renderer.h
254+ target_compile_options (SimpleEngineLib PRIVATE /FI "${CMAKE_CURRENT_SOURCE_DIR} /renderer.h" )
252255 target_link_libraries (SimpleEngineLib PUBLIC Dbghelp )
256+
257+ # Enable Link Time Code Generation to match Jolt and resolve potential LTO mismatches
258+ set_target_properties (SimpleEngineLib PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE )
259+ set_target_properties (AdvancedGLTF PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE )
260+
261+ # Jolt configuration consistency
262+ target_compile_definitions (SimpleEngineLib PUBLIC JPH_PROFILE_ENABLED JPH_EXTERNAL_PROFILE )
263+ target_compile_definitions (AdvancedGLTF PRIVATE JPH_PROFILE_ENABLED JPH_EXTERNAL_PROFILE )
253264elseif (WIN32 )
254265 target_compile_definitions (SimpleEngineLib PUBLIC
255266 NOMINMAX WIN32_LEAN_AND_MEAN _CRT_SECURE_NO_WARNINGS )
You can’t perform that action at this time.
0 commit comments