1
0
mirror of https://github.com/Yours3lf/rpi-vk-driver.git synced 2024-11-29 11:24:14 +01:00
rpi-vk-driver/driver/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.2 KiB
CMake

file(GLOB driverSrc
"*.h"
"*.c"
)
add_library(rpi-vk-driver SHARED ${driverSrc})
target_compile_options(rpi-vk-driver PRIVATE -Wextra -Wpacked -Wcast-align)
target_link_libraries(rpi-vk-driver drm pthread expat z dl $<TARGET_OBJECTS:brcm> $<TARGET_OBJECTS:QPUassembler>)
set_target_properties(rpi-vk-driver PROPERTIES C_STANDARD 11 C_EXTENSIONS OFF)
add_dependencies(rpi-vk-driver vulkan-headers brcm QPUassembler)
install(TARGETS rpi-vk-driver LIBRARY DESTINATION lib)
configure_file(rpi-vk-driver.json.in ${CMAKE_BINARY_DIR}/rpi-vk-driver.json @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/rpi-vk-driver.json DESTINATION share/vulkan/icd.d)
if(NOT CMAKE_CROSSCOMPILING)
# prevents sudo make
install(FILES
${CMAKE_BINARY_DIR}/vulkan-loader-prefix/src/vulkan-loader-build/loader/libvulkan.so
${CMAKE_BINARY_DIR}/vulkan-loader-prefix/src/vulkan-loader-build/loader/libvulkan.so.1
${CMAKE_BINARY_DIR}/vulkan-loader-prefix/src/vulkan-loader-build/loader/libvulkan.so.${VULKAN_VERSION}
DESTINATION lib
)
install(FILES
${CMAKE_BINARY_DIR}/vulkan-loader-prefix/src/vulkan-loader-build/loader/vulkan.pc
DESTINATION lib/pkgconfig
)
endif()