obs-websocket/cmake/obs-websocket-api.cmake
tytan652 c8cf2d94ac cmake,lib,base: Export obs-websocket-api as a target
This enables the installation of the header in the include directory
2024-03-30 17:04:37 -07:00

15 lines
738 B
CMake

add_library(obs-websocket-api INTERFACE)
add_library(OBS::websocket-api ALIAS obs-websocket-api)
target_sources(obs-websocket-api INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/lib/obs-websocket-api.h>
$<INSTALL_INTERFACE:${OBS_INCLUDE_DESTINATION}/obs-websocket-api.h>)
target_link_libraries(obs-websocket-api INTERFACE OBS::libobs)
target_include_directories(obs-websocket-api INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/lib>"
"$<INSTALL_INTERFACE:${OBS_INCLUDE_DESTINATION}>")
set_target_properties(obs-websocket-api PROPERTIES PREFIX "" PUBLIC_HEADER lib/obs-websocket-api.h)
target_export(obs-websocket-api)