Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 37 additions & 5 deletions samples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,33 @@ include_directories(${OPEN_SRC_INCLUDE_DIRS})
link_directories(${OPEN_SRC_INSTALL_PREFIX}/lib)

# copy sample frames to this subproject build folder, in case developer runs sample program with command `kvsWebrtcClientMaster` from `build/samples` dir.
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/opusSampleFrames" DESTINATION .)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/h264SampleFrames" DESTINATION .)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/h265SampleFrames" DESTINATION .)
# Only copy if the directories exist
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/opusSampleFrames")
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/opusSampleFrames" DESTINATION .)
message(STATUS "Copied opusSampleFrames")
else()
message(STATUS "opusSampleFrames directory not found, skipping")
endif()

if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/h264SampleFrames")
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/h264SampleFrames" DESTINATION .)
message(STATUS "Copied h264SampleFrames")
else()
message(STATUS "h264SampleFrames directory not found, skipping")
endif()

if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/h265SampleFrames")
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/h265SampleFrames" DESTINATION .)
message(STATUS "Copied h265SampleFrames")
else()
message(STATUS "h265SampleFrames directory not found, skipping")
endif()

add_executable(
kvsWebrtcClientMaster
Common.c
CameraInput.c
MjpegH264Extractor.c
kvsWebRTCClientMaster.c)
target_link_libraries(kvsWebrtcClientMaster kvsWebrtcClient kvsWebrtcSignalingClient ${EXTRA_DEPS} kvsCommonLws kvspicUtils websockets)

Expand All @@ -75,6 +95,19 @@ add_executable(
kvsWebRTCClientViewer.c)
target_link_libraries(kvsWebrtcClientViewer kvsWebrtcClient kvsWebrtcSignalingClient ${EXTRA_DEPS} kvsCommonLws kvspicUtils websockets)

add_executable(
kvsWebrtcClientMasterCamera
Common.c
CameraInput.c
MjpegH264Extractor.c
kvsWebRTCClientMasterCamera.c)
target_link_libraries(kvsWebrtcClientMasterCamera kvsWebrtcClient kvsWebrtcSignalingClient ${EXTRA_DEPS} kvsCommonLws kvspicUtils websockets)

add_executable(
kvsWebrtcClientMasterCameraDebug
kvsWebRTCClientMasterCameraDebug.c)
# デバッグツールは軽量にするため、最小限のライブラリのみリンク

add_executable(
discoverNatBehavior
discoverNatBehavior.c)
Expand Down Expand Up @@ -106,7 +139,6 @@ if(GST_FOUND)
)
endif()

install(TARGETS kvsWebrtcClientMaster kvsWebrtcClientViewer discoverNatBehavior
install(TARGETS kvsWebrtcClientMaster kvsWebrtcClientViewer kvsWebrtcClientMasterCamera discoverNatBehavior
RUNTIME DESTINATION bin
)

Loading