Forráskód Böngészése

Move CMake mods to root easy_profiler for easy_maintenance, build updates for D3D11 default

Josh Engebretson 8 éve
szülő
commit
208fe12518

+ 6 - 6
Build/Scripts/Bootstrap.js

@@ -45,7 +45,7 @@ function printHelp() {
       console.log("--vs2015        : Build with VS2015");
       console.log("--vs2017        : Build with VS2017");
       console.log("--opengl        : Enable OpenGL renderer");
-      console.log("--d3d11         : Enable DirectX 11 renderer");
+      console.log("--d3d9          : Enable DirectX 9 renderer");
     }
 
     console.log("--------------------------")
@@ -106,22 +106,22 @@ if (cmd == "buildeditor") {
         }
     }
 
-    if (config["d3d11"] && config["opengl"]) {
+    if (config["d3d9"] && config["opengl"]) {
 
         if (os.platform() == "win32") {
-            console.log("\nBoth DirectX 11 and OpenGL flags specified. Please choose only one at a time.\nExiting...\n");
+            console.log("\nBoth DirectX 9 and OpenGL flags specified. Please choose only one at a time.\nExiting...\n");
             process.exit(1);
         }
     }
 
-    if (config["d3d11"]) {
+    if (config["d3d9"]) {
 
         if (os.platform() != "win32") {
-            console.log("\nDirectX 11 build requires Windows, exiting\n");
+            console.log("\nDirectX 9 build requires Windows, exiting\n");
             process.exit(1);
         }
         else {
-            console.log("\nDirectX 11 build selected.\n");
+            console.log("\nDirectX 9 build selected.\n");
         }
     }
 

+ 2 - 2
Build/Scripts/BuildWindows.js

@@ -67,9 +67,9 @@ namespace('build', function() {
       // Redistributable editor build
       flags += "-DATOMIC_DEV_BUILD=0";
 
-      // graphics backend (overrides default DX9)
+      // graphics backend overrides, defaults to D3D11
       flags += " -DATOMIC_OPENGL=" + (config["opengl"] ? "ON" : "OFF");
-      flags += " -DATOMIC_D3D11=" + (config["d3d11"] ? "ON" : "OFF");
+      flags += " -DATOMIC_D3D11=" + (config["d3d9"] ? "OFF" : "ON");
 
       flags += "\"";
 

+ 2 - 2
Build/Scripts/CMakeWindows.js

@@ -23,9 +23,9 @@ namespace('build', function() {
     // local cmake builds are always dev builds
     var flags = "-DATOMIC_DEV_BUILD=1";
 
-    // graphics backend (overrides default DX9)
+    // graphics backend overrides, defaults DX11
     flags += " -DATOMIC_OPENGL=" + (config["opengl"] ? "ON" : "OFF");
-    flags += " -DATOMIC_D3D11=" + (config["d3d11"] ? "ON" : "OFF");
+    flags += " -DATOMIC_D3D11=" + (config["d3d9"] ? "OFF" : "ON");
 
     return flags;
 

+ 7 - 0
Source/ThirdParty/easy_profiler/CMakeLists.txt

@@ -13,6 +13,13 @@ find_package(Qt5Widgets)
 set(EASY_OPTION_LIB_STATIC ON CACHE BOOL "" FORCE)
 set(EASY_OPTION_PREDEFINED_COLORS ON CACHE BOOL "" FORCE)
 set(EASY_PROFILER_NO_SAMPLES ON CACHE BOOL "" FORCE)
+set(BUILD_WITH_CHRONO_HIGH_RESOLUTION_CLOCK OFF CACHE BOOL "" FORCE)
+
+# force std::chrono::high_resolution_clock usage on iOS
+if (IOS)
+    set(BUILD_WITH_CHRONO_HIGH_RESOLUTION_CLOCK ON FORCE)
+endif()
+
 if ("${CMAKE_SOURCE_DIR}" STREQUAL "${easy_profiler_SOURCE_DIR}")
     # Do not set these paths if easy_profiler is added as dependency to other projects.
     set_property(GLOBAL PROPERTY USE_FOLDERS ON)

+ 0 - 7
Source/ThirdParty/easy_profiler/easy_profiler_core/CMakeLists.txt

@@ -16,13 +16,6 @@ endif (WIN32)
 set(BUILD_WITH_CHRONO_STEADY_CLOCK     OFF    CACHE BOOL   "Use std::chrono::steady_clock as a timer" )
 set(BUILD_WITH_CHRONO_HIGH_RESOLUTION_CLOCK OFF CACHE BOOL "Use std::chrono::high_resolution_clock as a timer")
 
-# ATOMIC BEGIN
-# force std::chrono::high_resolution_clock usage on iOS
-if (IOS)
-    set(BUILD_WITH_CHRONO_HIGH_RESOLUTION_CLOCK ON)
-endif()
-# ATOMIC END
-
 message(STATUS "-------- EASY_PROFILER OPTIONS: --------")
 if (BUILD_WITH_CHRONO_STEADY_CLOCK)
     message(STATUS "  Use std::chrono::steady_clock as a timer")