-
-
Notifications
You must be signed in to change notification settings - Fork 710
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake,lib,base: Export obs-websocket-api as a target
This enables the installation of the header in the include directory
- Loading branch information
Showing
6 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
cmake_minimum_required(VERSION 3.22...3.25) | ||
|
||
legacy_check() | ||
|
||
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}/obs-websocket-api.h> | ||
$<INSTALL_INTERFACE:${OBS_INCLUDE_DESTINATION}/obs-websocker-api.h>) | ||
|
||
target_link_libraries(obs-websocket-api INTERFACE OBS::libobs) | ||
|
||
target_include_directories(obs-websocket-api INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>" | ||
"$<INSTALL_INTERFACE:${OBS_INCLUDE_DESTINATION}>") | ||
|
||
set_target_properties( | ||
obs-websocket-api | ||
PROPERTIES FOLDER websocket | ||
PREFIX "" | ||
PUBLIC_HEADER obs-websocket-api.h) | ||
|
||
target_export(obs-websocket-api) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
if(POLICY CMP0090) | ||
cmake_policy(SET CMP0090 NEW) | ||
endif() | ||
|
||
project(obs-websocket-api) | ||
|
||
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}/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}> | ||
$<INSTALL_INTERFACE:${OBS_INCLUDE_DESTINATION}>) | ||
|
||
set_target_properties(obs-websocket-api PROPERTIES FOLDER "websocket" PUBLIC_HEADER obs-websocket-api.h) | ||
|
||
export_target(obs-websocket-api) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@PACKAGE_INIT@ | ||
|
||
include(CMakeFindDependencyMacro) | ||
|
||
find_dependency(libobs REQUIRED) | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]") | ||
check_required_components("@PROJECT_NAME@") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters