Use find_program for gdbus-codegen
This commit is contained in:
@@ -80,6 +80,7 @@ elseif(WIVRN_USE_SYSTEM_BOOST STREQUAL "ON")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WIVRN_BUILD_SERVER)
|
if (WIVRN_BUILD_SERVER)
|
||||||
|
find_program(GDBUS_CODEGEN gdbus-codegen REQUIRED)
|
||||||
if (Vulkan_VERSION VERSION_LESS "1.3.261")
|
if (Vulkan_VERSION VERSION_LESS "1.3.261")
|
||||||
message(FATAL_ERROR "Vulkan version must be at least 1.3.261, found ${Vulkan_VERSION}")
|
message(FATAL_ERROR "Vulkan version must be at least 1.3.261, found ${Vulkan_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ endif()
|
|||||||
|
|
||||||
# Generate dbus interface code as a separate target to avoid warnings in generated code
|
# Generate dbus interface code as a separate target to avoid warnings in generated code
|
||||||
add_custom_command(OUTPUT wivrn_server_dbus.c wivrn_server_dbus.h
|
add_custom_command(OUTPUT wivrn_server_dbus.c wivrn_server_dbus.h
|
||||||
COMMAND gdbus-codegen ${CMAKE_CURRENT_SOURCE_DIR}/../dbus/io.github.wivrn.Server.xml --interface-prefix io.github.wivrn --generate-c-code wivrn_server_dbus --c-namespace Wivrn
|
COMMAND ${GDBUS_CODEGEN} ${CMAKE_CURRENT_SOURCE_DIR}/../dbus/io.github.wivrn.Server.xml --interface-prefix io.github.wivrn --generate-c-code wivrn_server_dbus --c-namespace Wivrn
|
||||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../dbus/io.github.wivrn.Server.xml)
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../dbus/io.github.wivrn.Server.xml)
|
||||||
add_custom_target(wivrn-server-dbus-codegen ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/wivrn_server_dbus.c ${CMAKE_CURRENT_BINARY_DIR}/wivrn_server_dbus.h)
|
add_custom_target(wivrn-server-dbus-codegen ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/wivrn_server_dbus.c ${CMAKE_CURRENT_BINARY_DIR}/wivrn_server_dbus.h)
|
||||||
add_library(wivrn-server-dbus STATIC
|
add_library(wivrn-server-dbus STATIC
|
||||||
|
|||||||
Reference in New Issue
Block a user