File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,13 +18,6 @@ endif()
1818list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR } /cmake" )
1919include (cage_all )
2020
21- option (cage_faster_debug "enable some optimizations to improve performance in debug builds" ON )
22- option (cage_faster_release "enable more aggressive inlining in release builds" OFF )
23- option (cage_assert_in_release_enabled "enable runtime asserts in non-debug builds" OFF )
24- option (cage_validate_graphics "enable runtime validation in webgpu/dawn" ON )
25- option (cage_profiling_enabled "enable compiling-in instructions for profiling" ON )
26- option (cage_use_steam_sockets "include Game Networking Sockets library by Valve/Steam" OFF )
27-
2821if (CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_BINARY_DIR )
2922 cage_default_init () # standalone build
3023else ()
Original file line number Diff line number Diff line change 11
2+ include (cage_options )
3+
24include (cage_assets )
35include (cage_build_configuration )
46include (cage_build_destination )
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ macro(cage_build_configuration)
6262 set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG } /Ob1" )
6363 set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG } /Ob1 /D_ITERATOR_DEBUG_LEVEL=0" )
6464 add_compile_definitions (_ITERATOR_DEBUG_LEVEL=0 )
65+ #set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
6566 endif ()
6667
6768 # optionally improve runtime performance in release builds (more aggressive inlining)
Original file line number Diff line number Diff line change 1+
2+ option (cage_faster_debug "enable some optimizations to improve performance in debug builds" ON )
3+ option (cage_faster_release "enable more aggressive inlining in release builds" OFF )
4+ option (cage_assert_in_release_enabled "enable runtime asserts in non-debug builds" OFF )
5+ option (cage_validate_graphics "enable runtime validation in webgpu/dawn" ON )
6+ option (cage_profiling_enabled "enable compiling-in instructions for profiling" ON )
7+ option (cage_use_steam_sockets "include Game Networking Sockets library by Valve/Steam" OFF )
Original file line number Diff line number Diff line change @@ -6,10 +6,13 @@ cage_heavily_optimized()
66
77set (BUILD_SHARED_LIBS OFF CACHE INTERNAL "BUILD_SHARED_LIBS" )
88set (ASSIMP_INSTALL OFF CACHE INTERNAL "Disable this if you want to use assimp as a submodule." )
9+ set (ASSIMP_INSTALL_PDB OFF CACHE INTERNAL "Create MSVC debug symbol files and add to Install target." )
910set (ASSIMP_BUILD_ZLIB OFF CACHE INTERNAL "Build your own zlib" )
1011set (ASSIMP_NO_EXPORT ON CACHE INTERNAL "Disable Assimp's export functionality." )
1112set (ASSIMP_BUILD_ASSIMP_TOOLS OFF CACHE INTERNAL "If the supplementary tools for Assimp are built in addition to the library." )
1213set (ASSIMP_BUILD_TESTS OFF CACHE INTERNAL "If the test suite for Assimp is built in addition to the library." )
14+ set (ASSIMP_WARNINGS_AS_ERRORS OFF CACHE INTERNAL "Treat all warnings as errors." )
15+ set (LIBRARY_SUFFIX "" CACHE INTERNAL "" )
1316
1417# disable some formats to speed up build
1518# one may enable them in the cache or by setting the default before including this cmake
Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ cage_replace_in_file(
1313 "${CMAKE_CURRENT_LIST_DIR } /dawn/third_party/CMakeLists.txt"
1414 "NOT TARGET glslang AND \\ (TINT_BUILD_GLSL_WRITER OR TINT_BUILD_GLSL_VALIDATOR\\ ) AND TINT_BUILD_CMD_TOOLS" "ON"
1515)
16+ cage_replace_in_file (
17+ "${CMAKE_CURRENT_LIST_DIR } /dawn/third_party/abseil-cpp/CMakeLists.txt"
18+ "set\\ (CMAKE_MSVC_RUNTIME_LIBRARY[^\\\n ]*\\ )" "# code removed by cage"
19+ )
1620cage_replace_in_file (
1721 "${CMAKE_CURRENT_LIST_DIR } /dawn/src/dawn/common/Constants.h"
1822 "kMaxSampledTexturesPerShaderStage = 16;" "kMaxSampledTexturesPerShaderStage = 32;"
@@ -80,7 +84,7 @@ unset(linux)
8084
8185# absl
8286set (ABSL_PROPAGATE_CXX_STD OFF CACHE INTERNAL "Use CMake C++ standard meta features (e.g. cxx_std_17) that propagate to targets that link to Abseil" )
83- set (ABSL_USE_SYSTEM_INCLUDES ON CACHE INTERNAL "Use CMake C++ standard meta features (e.g. cxx_std_17) that propagate to targets that link to Abseil " )
87+ set (ABSL_USE_SYSTEM_INCLUDES ON CACHE INTERNAL "Silence warnings in Abseil headers by marking them as SYSTEM includes " )
8488
8589
8690# protobuf
Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ message(STATUS "----------------------------------------------------------------
22message (STATUS "openxr-sdk" )
33message (STATUS "----------------------------------------------------------------" )
44
5+ cage_replace_in_file (
6+ "${CMAKE_CURRENT_LIST_DIR } /OpenXR-SDK/src/loader/CMakeLists.txt"
7+ "MSVC_RUNTIME_LIBRARY" "cage_modified_MSVC_RUNTIME_LIBRARY"
8+ )
9+
510unset (CMAKE_C_STANDARD )
611unset (CMAKE_CXX_STANDARD )
712
Original file line number Diff line number Diff line change @@ -55,4 +55,6 @@ git_ignore_file "externals/dawn/dawn" "CMakeLists.txt"
5555git_ignore_file " externals/dawn/dawn" " src/dawn/common/Constants.h"
5656git_ignore_file " externals/dawn/dawn" " third_party/CMakeLists.txt"
5757git_ignore_file " externals/dawn/dawn" " third_party/glslang/src"
58+ git_ignore_file " externals/dawn/dawn/third_party/abseil-cpp" " CMakeLists.txt"
59+ git_ignore_file " externals/openxr-sdk/OpenXR-SDK" " src/loader/CMakeLists.txt"
5860git_ignore_file " externals/quickhull/quickhull" " QuickHull.cpp"
You can’t perform that action at this time.
0 commit comments