Skip to content

Commit

Permalink
Move khronos headers to source_third_party
Browse files Browse the repository at this point in the history
  • Loading branch information
solidpixel committed Jan 12, 2025
1 parent 64ebcaf commit 97bf665
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 42 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[submodule "khronos/vulkan"]
path = khronos/vulkan
path = source_third_party/khronos/vulkan
url = https://github.com/KhronosGroup/Vulkan-Headers
[submodule "khronos/opengles"]
path = khronos/opengles
path = source_third_party/khronos/opengles
url = https://github.com/KhronosGroup/OpenGL-Registry
[submodule "khronos/egl"]
path = khronos/egl
path = source_third_party/khronos/egl
url = https://github.com/KhronosGroup/EGL-Registry
[submodule "source_third_party/gtest"]
path = source_third_party/gtest
Expand Down
2 changes: 1 addition & 1 deletion generator/generate_vulkan_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ def main() -> int:
outdir = os.path.join(base_dir, '..', 'source_common', 'framework')

# Parse the XML headers
tree = ET.parse('./khronos/vulkan/registry/vk.xml')
tree = ET.parse('./source_third_party/khronos/vulkan/registry/vk.xml')
root = tree.getroot()

# Parse function to API version or extension mapping
Expand Down
12 changes: 6 additions & 6 deletions generator/vk_codegen/source_CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: MIT
# -----------------------------------------------------------------------------
# Copyright (c) 2024 Arm Limited
# Copyright (c) 2024-2025 Arm Limited
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
Expand Down Expand Up @@ -41,19 +41,19 @@ configure_file(

add_library(
${VK_LAYER} SHARED
${PROJECT_SOURCE_DIR}/../source_common/framework/entry.cpp
../../source_common/framework/entry.cpp
device.cpp
instance.cpp)

target_include_directories(
${VK_LAYER} PRIVATE
${PROJECT_SOURCE_DIR}/../source_common
${CMAKE_CURRENT_BINARY_DIR}
.)
./
../../source_common/
${CMAKE_CURRENT_BINARY_DIR})

target_include_directories(
${VK_LAYER} SYSTEM PRIVATE
../../khronos/vulkan/include)
../../source_third_party/khronos/vulkan/include/)

lgl_set_build_options(${VK_LAYER})

Expand Down
12 changes: 6 additions & 6 deletions layer_example/source/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: MIT
# -----------------------------------------------------------------------------
# Copyright (c) 2024 Arm Limited
# Copyright (c) 2024-2025 Arm Limited
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
Expand Down Expand Up @@ -41,20 +41,20 @@ configure_file(

add_library(
${VK_LAYER} SHARED
${PROJECT_SOURCE_DIR}/../source_common/framework/entry.cpp
../../source_common/framework/entry.cpp
device.cpp
instance.cpp
layer_device_functions.cpp)

target_include_directories(
${VK_LAYER} PRIVATE
${PROJECT_SOURCE_DIR}/../source_common
${CMAKE_CURRENT_BINARY_DIR}
.)
./
../../source_common/
${CMAKE_CURRENT_BINARY_DIR})

target_include_directories(
${VK_LAYER} SYSTEM PRIVATE
../../khronos/vulkan/include)
../../source_third_party/khronos/vulkan/include/)

lgl_set_build_options(${VK_LAYER})

Expand Down
12 changes: 6 additions & 6 deletions layer_gpu_support/source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ configure_file(

add_library(
${VK_LAYER} SHARED
${PROJECT_SOURCE_DIR}/../source_common/framework/entry.cpp
../../source_common/framework/entry.cpp
device.cpp
instance.cpp
layer_config.cpp
Expand All @@ -53,14 +53,14 @@ add_library(

target_include_directories(
${VK_LAYER} PRIVATE
${PROJECT_SOURCE_DIR}/../source_common
${CMAKE_CURRENT_BINARY_DIR}
.)
./
../../source_common/
${CMAKE_CURRENT_BINARY_DIR})

target_include_directories(
${VK_LAYER} SYSTEM PRIVATE
${PROJECT_SOURCE_DIR}/../source_third_party
${PROJECT_SOURCE_DIR}/../khronos/vulkan/include)
../../source_third_party/
../../source_third_party/khronos/vulkan/include/)

lgl_set_build_options(${VK_LAYER})

Expand Down
14 changes: 7 additions & 7 deletions layer_gpu_timeline/source/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: MIT
# -----------------------------------------------------------------------------
# Copyright (c) 2024 Arm Limited
# Copyright (c) 2024-2025 Arm Limited
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
Expand Down Expand Up @@ -41,7 +41,7 @@ configure_file(

add_library(
${VK_LAYER} SHARED
${PROJECT_SOURCE_DIR}/../source_common/framework/entry.cpp
../../source_common/framework/entry.cpp
device.cpp
instance.cpp
layer_device_functions_command_buffer.cpp
Expand All @@ -57,14 +57,14 @@ add_library(

target_include_directories(
${VK_LAYER} PRIVATE
${PROJECT_SOURCE_DIR}/../source_common
${CMAKE_CURRENT_BINARY_DIR}
.)
./
../../source_common/
${CMAKE_CURRENT_BINARY_DIR})

target_include_directories(
${VK_LAYER} SYSTEM PRIVATE
${PROJECT_SOURCE_DIR}/../source_third_party
${PROJECT_SOURCE_DIR}/../khronos/vulkan/include)
../../source_third_party/
../../source_third_party/khronos/vulkan/include/)

lgl_set_build_options(${VK_LAYER})

Expand Down
8 changes: 5 additions & 3 deletions source_common/comms/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ add_executable(
target_include_directories(
${TEST_BINARY} PRIVATE
../../
../../../source_third_party/
../../../source_third_party/khronos/vulkan/include
${gtest_SOURCE_DIR}/include)

target_link_libraries(
Expand Down Expand Up @@ -66,9 +68,9 @@ target_link_libraries(

# Exclude from ctest for now because it needs user to manually run the
# external server program before the test can pass
#add_test(
# NAME ${TEST_BINARY}
# COMMAND ${TEST_BINARY})
# add_test(
# NAME ${TEST_BINARY}
# COMMAND ${TEST_BINARY})

install(
TARGETS ${TEST_BINARY}
Expand Down
13 changes: 6 additions & 7 deletions source_common/framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,15 @@ add_library(

target_include_directories(
${LIB_BINARY} PRIVATE
# Include from the layer-specific tree
../
# Include from the layer-specific trees
${PROJECT_SOURCE_DIR}/source
# Needed for CMake generated version.hpp
${PROJECT_BINARY_DIR}/source
../)
${PROJECT_BINARY_DIR}/source)

target_include_directories(
${LIB_BINARY} SYSTEM PRIVATE
${PROJECT_SOURCE_DIR}/../source_third_party
${PROJECT_SOURCE_DIR}/../khronos/vulkan/include
../)
../
../../source_third_party/
../../source_third_party/khronos/vulkan/include/)

lgl_set_build_options(${LIB_BINARY})
6 changes: 3 additions & 3 deletions source_common/trackers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ add_library(

target_include_directories(
${LIB_BINARY} PRIVATE
../../khronos/vulkan/include
../../source_third_party
../)
../
../../source_third_party/
../../source_third_party/khronos/vulkan/include)

lgl_set_build_options(${LIB_BINARY})

Expand Down

0 comments on commit 97bf665

Please sign in to comment.