1
0
mirror of https://github.com/Yours3lf/rpi-vk-driver.git synced 2025-02-20 17:54:17 +01:00
rpi-vk-driver/brcm/CMakeLists.txt
Joel Winarske 9bda8097bd Testing, Packaging, Vulkan, Clang/Yocto support
-----------------------------------------------
-j support.  Yocto needs this.
Move external references into toolchain to avoid conflict with Yocto Sysroot.
Move CPU tuning into toolchain.  Clang uses a different tuning scheme.
Python required check for Yocto.
Correct usage of project details.  Required for packaging step.
Organize key/value to enable central place to change
Toolchain path is discovered based on toolchain triple.  Minimum requirement is to add toolchain bin path to your path.
Add install_user step to replace install.sh
Allow overriding user name.  Username will not always be 'pi'.
zlib.h and zconf.h from raspbian rootfs (missing form rpi toolchain sysroot)
rename drm-uapi to match yocto -> libdrm
packaging, testing, and rpath for unit tests
stick with sdk branches
CMake documentation -> BUILD.md
Move -Wall to global.cmake, which makes for easier filtering
Rename toolchain.cmake as it is GCC specific
vulkaninfo from vulkan-tools
2020-07-07 07:59:07 -07:00

29 lines
1.0 KiB
CMake

file(GLOB brcmSrc
"cle/*.h"
"cle/*.c"
"clif/*.h"
"clif/*.c"
"common/*.h"
"common/*.c"
"qpu/*.h"
"qpu/*.c"
)
find_program(python REQUIRED)
execute_process(COMMAND "python" "${CMAKE_CURRENT_SOURCE_DIR}/cle/gen_pack_header.py" "${CMAKE_CURRENT_SOURCE_DIR}/cle/v3d_packet_v21.xml" "21" OUTPUT_VARIABLE V3D_PACKET_V21_PACK ERROR_VARIABLE CMD_ERROR)
if(CMD_ERROR STREQUAL "")
file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/cle/v3d_packet_v21_pack.h" "${V3D_PACKET_V21_PACK}" )
else(CMD_ERROR STREQUAL "")
message(FATAL_ERROR ${CMD_ERROR})
endif(CMD_ERROR STREQUAL "")
execute_process(COMMAND "python" "${CMAKE_CURRENT_SOURCE_DIR}/cle/gen_zipped_file.py" "${CMAKE_CURRENT_SOURCE_DIR}/cle/v3d_packet_v21.xml" OUTPUT_VARIABLE V3D_XML ERROR_VARIABLE CMD_ERROR2)
if(CMD_ERROR2 STREQUAL "")
file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/cle/v3d_xml.h" "${V3D_XML}" )
else(CMD_ERROR2 STREQUAL "")
message(FATAL_ERROR ${CMD_ERROR2})
endif(CMD_ERROR2 STREQUAL "")
add_library(brcm OBJECT ${brcmSrc})
target_compile_definitions(brcm PRIVATE V3D_VERSION=21)