mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-19 13:18:32 +00:00
cmake: Fix warning in SteamVR driver target
This commit is contained in:
parent
8f10d9c2b8
commit
4c4a204f22
|
@ -1,51 +1,60 @@
|
||||||
# Copyright 2020, Collabora, Ltd.
|
# Copyright 2020, Collabora, Ltd.
|
||||||
# SPDX-License-Identifier: BSL-1.0
|
# SPDX-License-Identifier: BSL-1.0
|
||||||
|
|
||||||
|
add_library(driver_monado MODULE main.c)
|
||||||
|
|
||||||
add_library(driver_monado MODULE
|
target_link_libraries(
|
||||||
main.c
|
driver_monado PRIVATE xrt-external-openvr aux_util st_ovrd st_prober target_lists target_instance_no_comp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(driver_monado PRIVATE
|
|
||||||
xrt-external-openvr
|
|
||||||
aux_util
|
|
||||||
st_ovrd
|
|
||||||
st_prober
|
|
||||||
target_lists
|
|
||||||
target_instance_no_comp
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# meta data that the steamvr plugin needs in the base directory of the steamvr plugin
|
# meta data that the steamvr plugin needs in the base directory of the steamvr plugin
|
||||||
file(COPY driver.vrdrivermanifest DESTINATION ${CMAKE_BINARY_DIR}/steamvr-monado)
|
file(COPY driver.vrdrivermanifest DESTINATION ${PROJECT_BINARY_DIR}/steamvr-monado)
|
||||||
file(COPY resources DESTINATION ${CMAKE_BINARY_DIR}/steamvr-monado)
|
file(COPY resources DESTINATION ${PROJECT_BINARY_DIR}/steamvr-monado)
|
||||||
|
|
||||||
#determine the output directory for the steamvr plugin
|
#determine the output directory for the steamvr plugin
|
||||||
if (WIN32)
|
if(WIN32)
|
||||||
# FIXME need to account for different architectures
|
# FIXME need to account for different architectures
|
||||||
if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||||
set(PLUGINDIR ${CMAKE_BINARY_DIR}/steamvr-monado/bin/win64 CACHE TYPE INTERNAL)
|
set(PLUGINDIR
|
||||||
else()
|
${PROJECT_BINARY_DIR}/steamvr-monado/bin/win64
|
||||||
set(PLUGINDIR ${CMAKE_BINARY_DIR}/steamvr-monado/bin/win32 CACHE TYPE INTERNAL)
|
CACHE INTERNAL ""
|
||||||
endif()
|
)
|
||||||
|
else()
|
||||||
|
set(PLUGINDIR
|
||||||
|
${PROJECT_BINARY_DIR}/steamvr-monado/bin/win32
|
||||||
|
CACHE INTERNAL ""
|
||||||
|
)
|
||||||
|
endif()
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||||
set(PLUGINDIR ${CMAKE_BINARY_DIR}/steamvr-monado/bin/osx64 CACHE STRING INTERNAL)
|
set(PLUGINDIR
|
||||||
else()
|
${PROJECT_BINARY_DIR}/steamvr-monado/bin/osx64
|
||||||
set(PLUGINDIR ${CMAKE_BINARY_DIR}/steamvr-monado/bin/osx32 CACHE STRING INTERNAL)
|
CACHE INTERNAL ""
|
||||||
endif()
|
)
|
||||||
|
else()
|
||||||
|
set(PLUGINDIR
|
||||||
|
${PROJECT_BINARY_DIR}/steamvr-monado/bin/osx32
|
||||||
|
CACHE INTERNAL ""
|
||||||
|
)
|
||||||
|
endif()
|
||||||
elseif(NOT ANDROID)
|
elseif(NOT ANDROID)
|
||||||
if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||||
set(PLUGINDIR ${CMAKE_BINARY_DIR}/steamvr-monado/bin/linux64 CACHE STRING INTERNAL)
|
set(PLUGINDIR
|
||||||
else()
|
${PROJECT_BINARY_DIR}/steamvr-monado/bin/linux64
|
||||||
set(PLUGINDIR ${CMAKE_BINARY_DIR}/steamvr-monado/bin/linux32 CACHE STRING INTERNAL)
|
CACHE INTERNAL ""
|
||||||
endif()
|
)
|
||||||
|
else()
|
||||||
|
set(PLUGINDIR
|
||||||
|
${PROJECT_BINARY_DIR}/steamvr-monado/bin/linux32
|
||||||
|
CACHE INTERNAL ""
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
MESSAGE("SteamVR plugin path: ${PLUGINDIR}")
|
message("SteamVR plugin path: ${PLUGINDIR}")
|
||||||
set_target_properties(driver_monado PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${PLUGINDIR}")
|
set_target_properties(driver_monado PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${PLUGINDIR}")
|
||||||
|
|
||||||
# don't add lib prefix to driver_monado.so
|
# don't add lib prefix to driver_monado.so
|
||||||
SET_TARGET_PROPERTIES(driver_monado PROPERTIES PREFIX "")
|
set_target_properties(driver_monado PROPERTIES PREFIX "")
|
||||||
|
|
||||||
install(DIRECTORY "${PROJECT_BINARY_DIR}/steamvr-monado" DESTINATION "${CMAKE_INSTALL_PREFIX}/share")
|
install(DIRECTORY "${PROJECT_BINARY_DIR}/steamvr-monado" DESTINATION "${CMAKE_INSTALL_PREFIX}/share")
|
||||||
|
|
Loading…
Reference in a new issue