Quellcode durchsuchen

Fix the HLSL_VERSION_LOCATION when build DXC in a parent project (#2480)

Minmin Gong vor 6 Jahren
Ursprung
Commit
513276e846
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      CMakeLists.txt

+ 2 - 2
CMakeLists.txt

@@ -81,7 +81,7 @@ endif()
 
 option(HLSL_EMBED_VERSION "If set, embeds version information in the binaries." ON) # HLSL Change
 # HLSL Change - Directory with version.inc file used for the build (generated or copied from HLSL_FIXED_VERSION_LOCATION)
-set(HLSL_VERSION_LOCATION ${CMAKE_BINARY_DIR}\\utils\\version) 
+set(HLSL_VERSION_LOCATION ${CMAKE_CURRENT_BINARY_DIR}\\utils\\version)
 option(HLSL_OFFICIAL_BUILD "If set, embeds official version in the binaries (based on the latest release version)" OFF) # HLSL Change
 option(HLSL_ENABLE_FIXED_VER "Reads version information from a file." OFF) # HLSL Change
 
@@ -89,7 +89,7 @@ if (HLSL_ENABLE_FIXED_VER)
   set(HLSL_EMBED_VERSION ON)
   if (NOT DEFINED HLSL_FIXED_VERSION_LOCATION)
     # HLSL Change - Directory with fixed version.inc file
-    set(HLSL_FIXED_VERSION_LOCATION  ${CMAKE_SOURCE_DIR}\\utils\\version) 
+    set(HLSL_FIXED_VERSION_LOCATION  ${CMAKE_CURRENT_SOURCE_DIR}\\utils\\version)
   endif()
 endif()