Skip to content

Commit a4356a0

Browse files
fix windows installs
1 parent d9e7bae commit a4356a0

13 files changed

Lines changed: 28 additions & 25 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,3 @@ add_subdirectory(simple_joystick_sender)
9393
add_subdirectory(simple_joystick_receiver)
9494
add_subdirectory(ping_pong_ping)
9595
add_subdirectory(ping_pong_pong)
96-
97-
livekit_copy_windows_runtime_dlls(basic_room)
98-
livekit_copy_windows_runtime_dlls(SimpleRoom)
99-
livekit_copy_windows_runtime_dlls(SimpleRpc)
100-
livekit_copy_windows_runtime_dlls(SimpleDataStream)
101-
livekit_copy_windows_runtime_dlls(LoggingLevelsBasicUsage)
102-
livekit_copy_windows_runtime_dlls(LoggingLevelsCustomSinks)
103-
livekit_copy_windows_runtime_dlls(HelloLivekitSender)
104-
livekit_copy_windows_runtime_dlls(HelloLivekitReceiver)
105-
livekit_copy_windows_runtime_dlls(SimpleJoystickSender)
106-
livekit_copy_windows_runtime_dlls(SimpleJoystickReceiver)
107-
livekit_copy_windows_runtime_dlls(PingPongPing)
108-
livekit_copy_windows_runtime_dlls(PingPongPong)

basic_room/CMakeLists.txt

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,10 @@ get_filename_component(_lk_lib_dir "${_lk_cmake_dir}" DIRECTORY) # .../lib
2727
target_link_directories(basic_room PRIVATE "${_lk_lib_dir}")
2828

2929

30-
# Nice-to-have: copy runtime DLLs next to the exe on Windows for "run from build dir".
31-
# Only do this if your exported package provides these targets.
30+
# Nice-to-have: copy extra runtime DLLs next to the exe on Windows for "run from build dir".
31+
# The common LiveKit runtime copies are handled by livekit_copy_windows_runtime_dlls()
32+
# in this target's directory below.
3233
if(WIN32)
33-
# livekit_ffi.dll
34-
if(TARGET LiveKit::livekit_ffi)
35-
add_custom_command(TARGET basic_room POST_BUILD
36-
COMMAND ${CMAKE_COMMAND} -E copy_if_different
37-
"$<TARGET_FILE:LiveKit::livekit_ffi>"
38-
"$<TARGET_FILE_DIR:basic_room>"
39-
)
40-
endif()
41-
4234
# If you also export protobuf/abseil runtime targets, copy them too (optional).
4335
if(TARGET protobuf::libprotobuf)
4436
add_custom_command(TARGET basic_room POST_BUILD
@@ -53,6 +45,8 @@ if(WIN32)
5345
COMMAND ${CMAKE_COMMAND} -E copy_if_different
5446
"$<TARGET_FILE:absl::abseil_dll>"
5547
"$<TARGET_FILE_DIR:basic_room>"
56-
)
48+
)
5749
endif()
5850
endif()
51+
52+
livekit_copy_windows_runtime_dlls(basic_room)

hello_livekit_receiver/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ add_executable(HelloLivekitReceiver
1818

1919
target_include_directories(HelloLivekitReceiver PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
2020
target_link_libraries(HelloLivekitReceiver PRIVATE ${LIVEKIT_CORE_TARGET})
21+
22+
livekit_copy_windows_runtime_dlls(HelloLivekitReceiver)

hello_livekit_sender/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ add_executable(HelloLivekitSender
1818

1919
target_include_directories(HelloLivekitSender PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
2020
target_link_libraries(HelloLivekitSender PRIVATE ${LIVEKIT_CORE_TARGET})
21+
22+
livekit_copy_windows_runtime_dlls(HelloLivekitSender)

logging_levels_basic_usage/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ add_executable(LoggingLevelsBasicUsage
1818

1919
target_include_directories(LoggingLevelsBasicUsage PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
2020
target_link_libraries(LoggingLevelsBasicUsage PRIVATE ${LIVEKIT_CORE_TARGET})
21+
22+
livekit_copy_windows_runtime_dlls(LoggingLevelsBasicUsage)

logging_levels_custom_sinks/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ add_executable(LoggingLevelsCustomSinks
1818

1919
target_include_directories(LoggingLevelsCustomSinks PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
2020
target_link_libraries(LoggingLevelsCustomSinks PRIVATE ${LIVEKIT_CORE_TARGET})
21+
22+
livekit_copy_windows_runtime_dlls(LoggingLevelsCustomSinks)

ping_pong_ping/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ add_executable(PingPongPing
2929

3030
target_include_directories(PingPongPing PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
3131
target_link_libraries(PingPongPing PRIVATE ping_pong_ping_support ${LIVEKIT_CORE_TARGET})
32+
33+
livekit_copy_windows_runtime_dlls(PingPongPing)

ping_pong_pong/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ add_executable(PingPongPong
2929

3030
target_include_directories(PingPongPong PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
3131
target_link_libraries(PingPongPong PRIVATE ping_pong_pong_support ${LIVEKIT_CORE_TARGET})
32+
33+
livekit_copy_windows_runtime_dlls(PingPongPong)

simple_data_stream/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ add_executable(SimpleDataStream
1919
target_include_directories(SimpleDataStream PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
2020
target_link_libraries(SimpleDataStream PRIVATE ${LIVEKIT_CORE_TARGET})
2121

22+
livekit_copy_windows_runtime_dlls(SimpleDataStream)
23+
2224
if(LIVEKIT_DATA_DIR)
2325
add_custom_command(TARGET SimpleDataStream POST_BUILD
2426
COMMAND ${CMAKE_COMMAND} -E copy_directory

simple_joystick_receiver/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ add_executable(SimpleJoystickReceiver
2828

2929
target_include_directories(SimpleJoystickReceiver PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
3030
target_link_libraries(SimpleJoystickReceiver PRIVATE simple_joystick_receiver_support ${LIVEKIT_CORE_TARGET})
31+
32+
livekit_copy_windows_runtime_dlls(SimpleJoystickReceiver)

0 commit comments

Comments
 (0)