Initial Commit
This commit is contained in:
33
CMakeLists.txt
Normal file
33
CMakeLists.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(rtmp-cpp)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
include_directories(include)
|
||||
|
||||
add_library(rtmp SHARED
|
||||
src/rtmp_server.cpp
|
||||
src/rtmp_capi.cpp
|
||||
)
|
||||
|
||||
target_include_directories(rtmp PUBLIC
|
||||
<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
<INSTALL_INTERFACE:include>
|
||||
)
|
||||
|
||||
set_target_properties(rtmp PROPERTIES
|
||||
PUBLIC_HEADER include/rtmp_capi.h
|
||||
)
|
||||
|
||||
# Example executable
|
||||
add_executable(rtmp_example example/main.c)
|
||||
target_link_libraries(rtmp_example rtmp)
|
||||
|
||||
install(TARGETS rtmp
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
PUBLIC_HEADER DESTINATION include
|
||||
)
|
||||
|
||||
install(TARGETS rtmp_example DESTINATION bin)
|
||||
Reference in New Issue
Block a user