mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-09-01 14:49:25 +00:00
Merge pull request #337 from hanseuljun/windows-examples-dll-copy
Add copy commands that copies datachannel.dll to examples when examples built
This commit is contained in:
@ -4,10 +4,10 @@ if(POLICY CMP0079)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
add_executable(datachannel-client main.cpp parse_cl.cpp parse_cl.h getopt.cpp getopt.h)
|
add_executable(datachannel-client main.cpp parse_cl.cpp parse_cl.h getopt.cpp getopt.h)
|
||||||
target_compile_definitions(datachannel-client PUBLIC STATIC_GETOPT)
|
target_compile_definitions(datachannel-client PUBLIC STATIC_GETOPT)
|
||||||
else()
|
else()
|
||||||
add_executable(datachannel-client main.cpp parse_cl.cpp parse_cl.h)
|
add_executable(datachannel-client main.cpp parse_cl.cpp parse_cl.h)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties(datachannel-client PROPERTIES
|
set_target_properties(datachannel-client PROPERTIES
|
||||||
@ -15,3 +15,10 @@ set_target_properties(datachannel-client PROPERTIES
|
|||||||
OUTPUT_NAME client)
|
OUTPUT_NAME client)
|
||||||
target_link_libraries(datachannel-client datachannel nlohmann_json)
|
target_link_libraries(datachannel-client datachannel nlohmann_json)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
add_custom_command(TARGET datachannel-client POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
"$<TARGET_FILE_DIR:datachannel>/datachannel.dll"
|
||||||
|
$<TARGET_FILE_DIR:datachannel-client>
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
@ -13,3 +13,15 @@ set_target_properties(datachannel-copy-paste-capi-answerer PROPERTIES
|
|||||||
OUTPUT_NAME answerer)
|
OUTPUT_NAME answerer)
|
||||||
target_link_libraries(datachannel-copy-paste-capi-answerer datachannel)
|
target_link_libraries(datachannel-copy-paste-capi-answerer datachannel)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
add_custom_command(TARGET datachannel-copy-paste-capi-offerer POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
"$<TARGET_FILE_DIR:datachannel>/datachannel.dll"
|
||||||
|
$<TARGET_FILE_DIR:datachannel-copy-paste-capi-offerer>
|
||||||
|
)
|
||||||
|
add_custom_command(TARGET datachannel-copy-paste-capi-answerer POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
"$<TARGET_FILE_DIR:datachannel>/datachannel.dll"
|
||||||
|
$<TARGET_FILE_DIR:datachannel-copy-paste-capi-answerer>
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
@ -12,3 +12,15 @@ set_target_properties(datachannel-copy-paste-answerer PROPERTIES
|
|||||||
OUTPUT_NAME answerer)
|
OUTPUT_NAME answerer)
|
||||||
target_link_libraries(datachannel-copy-paste-answerer datachannel)
|
target_link_libraries(datachannel-copy-paste-answerer datachannel)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
add_custom_command(TARGET datachannel-copy-paste-offerer POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
"$<TARGET_FILE_DIR:datachannel>/datachannel.dll"
|
||||||
|
$<TARGET_FILE_DIR:datachannel-copy-paste-offerer>
|
||||||
|
)
|
||||||
|
add_custom_command(TARGET datachannel-copy-paste-answerer POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
"$<TARGET_FILE_DIR:datachannel>/datachannel.dll"
|
||||||
|
$<TARGET_FILE_DIR:datachannel-copy-paste-answerer>
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
@ -6,3 +6,10 @@ set_target_properties(datachannel-media PROPERTIES
|
|||||||
OUTPUT_NAME media)
|
OUTPUT_NAME media)
|
||||||
target_link_libraries(datachannel-media datachannel nlohmann_json)
|
target_link_libraries(datachannel-media datachannel nlohmann_json)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
add_custom_command(TARGET datachannel-media POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
"$<TARGET_FILE_DIR:datachannel>/datachannel.dll"
|
||||||
|
$<TARGET_FILE_DIR:datachannel-media>
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
@ -6,3 +6,10 @@ set_target_properties(datachannel-sfu-media PROPERTIES
|
|||||||
OUTPUT_NAME sfu-media)
|
OUTPUT_NAME sfu-media)
|
||||||
target_link_libraries(datachannel-sfu-media datachannel nlohmann_json)
|
target_link_libraries(datachannel-sfu-media datachannel nlohmann_json)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
add_custom_command(TARGET datachannel-sfu-media POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
"$<TARGET_FILE_DIR:datachannel>/datachannel.dll"
|
||||||
|
$<TARGET_FILE_DIR:datachannel-sfu-media>
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
@ -3,17 +3,38 @@ if(POLICY CMP0079)
|
|||||||
cmake_policy(SET CMP0079 NEW)
|
cmake_policy(SET CMP0079 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
add_executable(streamer
|
||||||
|
main.cpp
|
||||||
|
dispatchqueue.cpp
|
||||||
|
dispatchqueue.hpp
|
||||||
|
h264fileparser.cpp
|
||||||
|
h264fileparser.hpp
|
||||||
|
helpers.cpp
|
||||||
|
helpers.hpp
|
||||||
|
opusfileparser.cpp
|
||||||
|
opusfileparser.hpp
|
||||||
|
fileparser.cpp
|
||||||
|
fileparser.hpp
|
||||||
|
stream.cpp
|
||||||
|
stream.hpp
|
||||||
|
ArgParser.cpp
|
||||||
|
ArgParser.hpp
|
||||||
|
)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
add_executable(streamer main.cpp dispatchqueue.cpp dispatchqueue.hpp h264fileparser.cpp h264fileparser.hpp helpers.cpp helpers.hpp opusfileparser.cpp opusfileparser.hpp fileparser.cpp fileparser.hpp stream.cpp stream.hpp ArgParser.hpp ArgParser.cpp)
|
target_compile_definitions(streamer PUBLIC STATIC_GETOPT)
|
||||||
target_compile_definitions(streamer PUBLIC STATIC_GETOPT)
|
|
||||||
else()
|
|
||||||
add_executable(streamer main.cpp dispatchqueue.cpp dispatchqueue.hpp h264fileparser.cpp h264fileparser.hpp helpers.cpp helpers.hpp opusfileparser.cpp opusfileparser.hpp fileparser.cpp fileparser.hpp stream.cpp stream.hpp ArgParser.hpp ArgParser.cpp)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties(streamer PROPERTIES
|
set_target_properties(streamer PROPERTIES
|
||||||
CXX_STANDARD 17
|
CXX_STANDARD 17
|
||||||
OUTPUT_NAME streamer)
|
OUTPUT_NAME streamer)
|
||||||
|
|
||||||
target_link_libraries(streamer datachannel)
|
|
||||||
|
|
||||||
target_link_libraries(streamer datachannel nlohmann_json)
|
target_link_libraries(streamer datachannel nlohmann_json)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
add_custom_command(TARGET streamer POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
"$<TARGET_FILE_DIR:datachannel>/datachannel.dll"
|
||||||
|
$<TARGET_FILE_DIR:streamer>
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
Reference in New Issue
Block a user