-
-
Save mlcollard/091ab275945332027b2dd88d8195aa70 to your computer and use it in GitHub Desktop.
CMake build file for StreamVideo project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cmake for StreamVideo project | |
cmake_minimum_required(VERSION 3.0.0) | |
set(CMAKE_CXX_STANDARD 11) | |
file(DOWNLOAD https://github.com/catchorg/Catch2/releases/download/v2.7.0/catch.hpp ${CMAKE_SOURCE_DIR}/catch.hpp) | |
add_library(video OBJECT Video.cpp Stream.cpp Account.cpp) | |
add_executable(StreamingActivity StreamingActivity.cpp $<TARGET_OBJECTS:video>) | |
add_executable(Video_t Video_t.cpp $<TARGET_OBJECTS:video>) | |
add_executable(Stream_t Stream_t.cpp $<TARGET_OBJECTS:video>) | |
add_executable(Account_t Account_t.cpp $<TARGET_OBJECTS:video>) | |
# data file to run with | |
configure_file(${CMAKE_SOURCE_DIR}/videos.csv ${CMAKE_BINARY_DIR}/videos.csv COPYONLY) | |
# run | |
add_custom_target(run COMMAND ./StreamingActivity DEPENDS StreamingActivity) | |
# test | |
add_custom_target(test COMMAND ${CMAKE_BINARY_DIR}/Video_t | |
COMMAND ${CMAKE_BINARY_DIR}/Stream_t | |
COMMAND ${CMAKE_BINARY_DIR}/Account_t | |
DEPENDS Video_t Stream_t Account_t) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment