Add common-server CMake library
This commit is contained in:
@@ -31,6 +31,7 @@ option(WIVRN_BUILD_SERVER_LIBRARY "Build OpenXR library for WiVRn server" ${WIVR
|
|||||||
option(WIVRN_BUILD_DASHBOARD "Build WiVRn dashboard" OFF)
|
option(WIVRN_BUILD_DASHBOARD "Build WiVRn dashboard" OFF)
|
||||||
option(WIVRN_BUILD_WIVRNCTL "Build wivrnctl" ON)
|
option(WIVRN_BUILD_WIVRNCTL "Build wivrnctl" ON)
|
||||||
option(WIVRN_BUILD_DISSECTOR "Build Wireshark dissector" OFF)
|
option(WIVRN_BUILD_DISSECTOR "Build Wireshark dissector" OFF)
|
||||||
|
option(WIVRN_BUILD_TEST "Build test binaries" OFF)
|
||||||
option(WIVRN_WERROR "Treat warnings as errors" OFF)
|
option(WIVRN_WERROR "Treat warnings as errors" OFF)
|
||||||
|
|
||||||
option(WIVRN_USE_NVENC "Enable nvenc (Nvidia) hardware encoder" ON)
|
option(WIVRN_USE_NVENC "Enable nvenc (Nvidia) hardware encoder" ON)
|
||||||
|
|||||||
+14
-10
@@ -23,20 +23,17 @@ endif()
|
|||||||
|
|
||||||
configure_file(wivrn_config.h.in wivrn_config.h)
|
configure_file(wivrn_config.h.in wivrn_config.h)
|
||||||
|
|
||||||
add_library(wivrn-common-base STATIC
|
add_library(wivrn-common-base STATIC EXCLUDE_FROM_ALL
|
||||||
application.cpp
|
|
||||||
utils/flatpak.cpp
|
|
||||||
utils/strings.cpp
|
utils/strings.cpp
|
||||||
utils/xdg_base_directory.cpp
|
utils/xdg_base_directory.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/version.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/version.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(wivrn-common STATIC
|
add_library(wivrn-common STATIC EXCLUDE_FROM_ALL
|
||||||
crypto.cpp
|
crypto.cpp
|
||||||
smp.cpp
|
smp.cpp
|
||||||
secrets.cpp
|
secrets.cpp
|
||||||
wivrn_sockets.cpp
|
wivrn_sockets.cpp
|
||||||
utils/xdg_base_directory.cpp
|
|
||||||
utils/strings.cpp
|
utils/strings.cpp
|
||||||
vk/allocation.cpp
|
vk/allocation.cpp
|
||||||
vk/error_category.cpp
|
vk/error_category.cpp
|
||||||
@@ -44,12 +41,20 @@ add_library(wivrn-common STATIC
|
|||||||
vk/vk_mem_alloc.cpp
|
vk/vk_mem_alloc.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if (TEST_APPS)
|
if (WIVRN_BUILD_DASHBOARD OR WIVRN_BUILD_SERVER)
|
||||||
add_executable(list-apps
|
add_library(wivrn-common-server STATIC EXCLUDE_FROM_ALL
|
||||||
test_application.cpp
|
utils/flatpak.cpp
|
||||||
|
application.cpp
|
||||||
)
|
)
|
||||||
|
target_link_libraries(wivrn-common-server PRIVATE nlohmann_json::nlohmann_json PUBLIC wivrn-common-base)
|
||||||
|
|
||||||
target_link_libraries(list-apps wivrn-common-base)
|
if (WIVRN_BUILD_TEST)
|
||||||
|
add_executable(list-apps
|
||||||
|
test_application.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(list-apps wivrn-common-server)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
@@ -122,5 +127,4 @@ endif()
|
|||||||
|
|
||||||
target_include_directories(wivrn-common-base PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
target_include_directories(wivrn-common-base PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
target_link_libraries(wivrn-common PUBLIC Boost::pfr OpenSSL::Crypto wivrn-external wivrn-common-base)
|
target_link_libraries(wivrn-common PUBLIC Boost::pfr OpenSSL::Crypto wivrn-external wivrn-common-base)
|
||||||
target_compile_features(wivrn-common PRIVATE cxx_std_20)
|
|
||||||
target_compile_definitions(wivrn-common PUBLIC VULKAN_HPP_NO_STRUCT_CONSTRUCTORS)
|
target_compile_definitions(wivrn-common PUBLIC VULKAN_HPP_NO_STRUCT_CONSTRUCTORS)
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ target_link_libraries(wivrn-dashboard
|
|||||||
QCoro::Network
|
QCoro::Network
|
||||||
QCoro::Qml
|
QCoro::Qml
|
||||||
wivrn-common-base
|
wivrn-common-base
|
||||||
|
wivrn-common-server
|
||||||
wivrn-external
|
wivrn-external
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -218,6 +218,7 @@ if (WIVRN_BUILD_SERVER)
|
|||||||
PkgConfig::AVAHI
|
PkgConfig::AVAHI
|
||||||
Eigen3::Eigen
|
Eigen3::Eigen
|
||||||
wivrn-common
|
wivrn-common
|
||||||
|
wivrn-common-server
|
||||||
wivrn-external
|
wivrn-external
|
||||||
nlohmann_json::nlohmann_json
|
nlohmann_json::nlohmann_json
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user