mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-08-31 11:29:28 +00:00
CMake improvements
This commit is contained in:
@ -215,7 +215,7 @@ set_target_properties(datachannel-static PROPERTIES
|
|||||||
VERSION ${PROJECT_VERSION}
|
VERSION ${PROJECT_VERSION}
|
||||||
CXX_STANDARD 17)
|
CXX_STANDARD 17)
|
||||||
|
|
||||||
target_include_directories(datachannel PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
target_include_directories(datachannel PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
||||||
target_include_directories(datachannel PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include/rtc)
|
target_include_directories(datachannel PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include/rtc)
|
||||||
target_include_directories(datachannel PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
target_include_directories(datachannel PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||||
target_link_libraries(datachannel PUBLIC Threads::Threads)
|
target_link_libraries(datachannel PUBLIC Threads::Threads)
|
||||||
@ -312,9 +312,6 @@ endif()
|
|||||||
add_library(LibDataChannel::LibDataChannel ALIAS datachannel)
|
add_library(LibDataChannel::LibDataChannel ALIAS datachannel)
|
||||||
add_library(LibDataChannel::LibDataChannelStatic ALIAS datachannel-static)
|
add_library(LibDataChannel::LibDataChannelStatic ALIAS datachannel-static)
|
||||||
|
|
||||||
install(TARGETS datachannel LIBRARY DESTINATION lib)
|
|
||||||
install(FILES ${LIBDATACHANNEL_HEADERS} DESTINATION include/rtc)
|
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
target_compile_options(datachannel PRIVATE -Wall -Wextra)
|
target_compile_options(datachannel PRIVATE -Wall -Wextra)
|
||||||
target_compile_options(datachannel-static PRIVATE -Wall -Wextra)
|
target_compile_options(datachannel-static PRIVATE -Wall -Wextra)
|
||||||
@ -330,6 +327,22 @@ if(WARNINGS_AS_ERRORS)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
install(TARGETS datachannel EXPORT datachannel-export
|
||||||
|
RUNTIME DESTINATION bin
|
||||||
|
LIBRARY DESTINATION lib
|
||||||
|
ARCHIVE DESTINATION lib
|
||||||
|
)
|
||||||
|
|
||||||
|
install(FILES ${LIBDATACHANNEL_HEADERS}
|
||||||
|
DESTINATION include/rtc
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
EXPORT datachannel-export
|
||||||
|
NAMESPACE LibDatachannel::
|
||||||
|
DESTINATION share/cmake/libdatachannel
|
||||||
|
)
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
if(NOT NO_TESTS)
|
if(NOT NO_TESTS)
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||||
|
Reference in New Issue
Block a user