-
-
Notifications
You must be signed in to change notification settings - Fork 361
/
CMakeLists.txt
65 lines (54 loc) · 2.13 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
cmake_minimum_required(VERSION 3.7)
set(OFFERER_UWP_RESOURCES
uwp/offerer/Logo.png
uwp/offerer/package.appxManifest
uwp/offerer/SmallLogo.png
uwp/offerer/SmallLogo44x44.png
uwp/offerer/SplashScreen.png
uwp/offerer/StoreLogo.png
uwp/offerer/Windows_TemporaryKey.pfx
)
set(ANSWERER_UWP_RESOURCES
uwp/answerer/Logo.png
uwp/answerer/package.appxManifest
uwp/answerer/SmallLogo.png
uwp/answerer/SmallLogo44x44.png
uwp/answerer/SplashScreen.png
uwp/answerer/StoreLogo.png
uwp/answerer/Windows_TemporaryKey.pfx
)
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
add_executable(datachannel-copy-paste-offerer offerer.cpp ${OFFERER_UWP_RESOURCES})
else()
add_executable(datachannel-copy-paste-offerer offerer.cpp)
endif()
set_target_properties(datachannel-copy-paste-offerer PROPERTIES
CXX_STANDARD 17
OUTPUT_NAME offerer)
set_target_properties(datachannel-copy-paste-offerer PROPERTIES
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER com.github.paullouisageneau.libdatachannel.examples.copypaste.offerer)
target_link_libraries(datachannel-copy-paste-offerer datachannel)
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
add_executable(datachannel-copy-paste-answerer answerer.cpp ${ANSWERER_UWP_RESOURCES})
else()
add_executable(datachannel-copy-paste-answerer answerer.cpp)
endif()
set_target_properties(datachannel-copy-paste-answerer PROPERTIES
CXX_STANDARD 17
OUTPUT_NAME answerer)
set_target_properties(datachannel-copy-paste-answerer PROPERTIES
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER com.github.paullouisageneau.libdatachannel.examples.copypaste.answerer)
find_package(Threads REQUIRED)
target_link_libraries(datachannel-copy-paste-answerer LibDataChannel::LibDataChannel Threads::Threads)
if(MSVC)
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()