Skip to content

Commit

Permalink
builtin: saner CMakeLists.txt (still not working)
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Cheraghi <[email protected]>
  • Loading branch information
alichraghi committed Sep 10, 2024
1 parent 65064e8 commit 16fc27d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/nbl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,7 @@ if(NBL_EMBED_BUILTIN_RESOURCES)
spirvBuiltinResourceData
boostBuiltinResourceData
deviceGenBuiltinResourceData
sprivIntrinsicsGenBuiltinResourceData
)

NBL_HOOK_INTERNAL_BUILTIN_RESOURCES("${NBL_INTERNAL_BUILTIN_TARGETS}")
Expand Down
13 changes: 6 additions & 7 deletions src/nbl/builtin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,10 @@ ADD_CUSTOM_BUILTIN_RESOURCES(nblBuiltinResourceData NBL_RESOURCES_TO_EMBED "${NB
get_filename_component(NBL_SPRIV_INTRINSICS_GEN_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/include" ABSOLUTE)
set(NBL_SPRIV_INTRINSICS_GEN_INCLUDE_DIR "${NBL_SPRIV_INTRINSICS_GEN_INCLUDE_DIR}")

set(NBL_OUTPUT_FILE "${NBL_OUTPUT_GEN_INCLUDE_DIR}/hlsl/spirv_intrinsics/core.hlsl")
file(MAKE_DIRECTORY "${NBL_OUTPUT_GEN_INCLUDE_DIR}/nbl/builtin/hlsl/spirv_intrinsics")

set(NBL_GEN_PY "${CMAKE_CURRENT_SOURCE_DIR}/gen.py")
set(NBL_OUTPUT_FILE "${NBL_SPRIV_INTRINSICS_GEN_INCLUDE_DIR}/nbl/builtin/hlsl/spirv_intrinsics/core.hlsl")
file(MAKE_DIRECTORY "${NBL_SPRIV_INTRINSICS_GEN_INCLUDE_DIR}/nbl/builtin/hlsl/spirv_intrinsics")

set(NBL_GEN_PY "${NBL_ROOT_PATH}/3rdparty/dxc/dxc/external/SPIRV-Headers/tools/hlsl_generator/gen.py")
set(NBL_COMMAND
"${_Python3_EXECUTABLE}"
"${NBL_GEN_PY}"
Expand All @@ -346,9 +345,9 @@ add_custom_command(OUTPUT "${NBL_OUTPUT_FILE}"
add_custom_target(SprivIntrinsics DEPENDS "${NBL_OUTPUT_FILE}")

if(NBL_EMBED_BUILTIN_RESOURCES)
LIST_BUILTIN_RESOURCE(NBL_SPRIV_INTRINSICS_GEN_RESOURCES_TO_EMBED "${NBL_OUTPUT_FILE}")
ADD_CUSTOM_BUILTIN_RESOURCES(sprivIntrinsicsGenBuiltinResourceData NBL_SPRIV_INTRINSICS_GEN_RESOURCES_TO_EMBED "${NBL_SPRIV_INTRINSICS_GEN_INCLUDE_DIR}" "nbl/builtin" "nbl::builtin" "${NBL_ROOT_PATH_BINARY}/include" "${NBL_ROOT_PATH_BINARY}/src" "STATIC" "INTERNAL")
add_dependencies(sprivIntrinsicsGenBuiltinResourceData DeviceHeaders)
LIST_BUILTIN_RESOURCE(NBL_SPRIV_INTRINSICS_GEN_RESOURCES_TO_EMBED "core.hlsl")
ADD_CUSTOM_BUILTIN_RESOURCES(sprivIntrinsicsGenBuiltinResourceData NBL_SPRIV_INTRINSICS_GEN_RESOURCES_TO_EMBED "${NBL_SPRIV_INTRINSICS_GEN_INCLUDE_DIR}" "nbl/builtin/hlsl/spirv_intrinsics" "nbl::builtin" "${CMAKE_CURRENT_BINARY_DIR}/include" "${CMAKE_CURRENT_BINARY_DIR}/src" "STATIC" "INTERNAL")
add_dependencies(sprivIntrinsicsGenBuiltinResourceData SprivIntrinsics)
endif()

set(NBL_SPRIV_INTRINSICS_GEN_INCLUDE_DIR
Expand Down

0 comments on commit 16fc27d

Please sign in to comment.