File CMakeLists.txt
Go to the documentation of this file
# module to build and install the offload_vio.server_tx ILLIXR plugin
cmake_minimum_required(VERSION 3.22)
if(WIN32 OR MSVC OR ANDROID)
message(WARNING "offload_rendering_client is not yet available for Windows or Android")
set(USE_OFFLOAD_VIO.SERVER_TX OFF)
return()
endif()
find_package(Protobuf REQUIRED)
include(../protoc_generate_cpp.cmake)
set(PLUGIN_NAME plugin.offload_vio.server_tx${ILLIXR_BUILD_SUFFIX})
# source files, listed individually so that any changes will trigger a rebuild
add_library(${PLUGIN_NAME} SHARED plugin.cpp
plugin.hpp
${CMAKE_SOURCE_DIR}/include/illixr/plugin.hpp
${CMAKE_SOURCE_DIR}/include/illixr/data_format/misc.hpp
${CMAKE_SOURCE_DIR}/include/illixr/phonebook.hpp
${CMAKE_SOURCE_DIR}/include/illixr/switchboard.hpp
)
set(protobuf_files
${CMAKE_CURRENT_SOURCE_DIR}/../proto/vio_output.proto
)
target_include_directories(${PLUGIN_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${Protobuf_INCLUDE_DIRS} ${ILLIXR_SOURCE_DIR}/include)
PROTOBUF_TARGET_CPP(${PLUGIN_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/../proto ${protobuf_files})
target_link_libraries(${PLUGIN_NAME}
protobuf::libprotobuf
spdlog::spdlog
)
if(WIN32 OR MSVC)
target_compile_definitions(${PLUGIN_NAME} PRIVATE BUILDING_LIBRARY)
endif()
target_compile_features(${PLUGIN_NAME} PRIVATE cxx_std_17)
install(TARGETS ${PLUGIN_NAME} DESTINATION lib)