Skip to content

Commit

Permalink
Merge branch 'release-1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
kohnech committed Oct 26, 2024
2 parents 8bd885a + e01ac47 commit 6a07389
Show file tree
Hide file tree
Showing 37 changed files with 1,209 additions and 140 deletions.
30 changes: 15 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
jobs:
build:
build-ubuntu-18.04:
docker:
- image: heliconwave/circleci-ubuntu-18.04:latest
steps:
Expand Down Expand Up @@ -28,13 +28,13 @@ jobs:
cat CPackConfig.cmake &&
cpack --config CPackConfig.cmake
- store_artifacts:
path: /root/project/mpeg2ts-0.6.0-Linux.tar.gz
path: /root/project/mpeg2ts-1.0.0-Linux.tar.gz
- persist_to_workspace:
root: /root/project
paths:
- Debug
- Release
build-16.04:
build-ubuntu-16.04:
docker:
- image: heliconwave/circleci-ubuntu-16.04:latest
steps:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
cat CPackConfig.cmake &&
cpack --config CPackConfig.cmake
- store_artifacts:
path: /root/project/mpeg2ts-0.6.0-Linux.tar.gz
path: /root/project/mpeg2ts-1.0.0-Linux.tar.gz
- persist_to_workspace:
root: /root/project
paths:
Expand All @@ -76,7 +76,7 @@ jobs:
# - run:
# name: Build CMake WebAssembly
# command: cd /root/project && em++ --version && pwd && rm -rf build/ && mkdir build && cd build/ && emcmake cmake -DCMAKE_CXX_STANDARD=11 -DENABLE_TESTS=OFF -DENABLE_WEBASSEMBLY=ON .. && cmake --build . -- -j$(nproc)
test-unit:
test-unit-u18.04:
docker:
- image: heliconwave/circleci-ubuntu-18.04:latest
working_directory: ~/project
Expand All @@ -87,7 +87,7 @@ jobs:
- run:
name: Run CTest
command: pwd && ls -ltrha && cd Debug/ && make unit-tests
test-unit-16.04:
test-unit-u16.04:
docker:
- image: heliconwave/circleci-ubuntu-16.04:latest
working_directory: ~/project
Expand Down Expand Up @@ -133,21 +133,21 @@ workflows:
version: 2
build-test-and-deploy:
jobs:
- build
- build-16.04
- build-ubuntu-18.04
- build-ubuntu-16.04
# - build-webassembly
- test-unit:
- test-unit-u18.04:
requires:
- build
- test-unit-16.04:
- build-ubuntu-18.04
- test-unit-u16.04:
requires:
- build-16.04
- build-ubuntu-16.04
- test-component:
requires:
- build
- build-ubuntu-18.04
- test-benchmark:
requires:
- build
- build-ubuntu-18.04
- test-memcheck:
requires:
- build
- build-ubuntu-18.04
2 changes: 1 addition & 1 deletion .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-10.15, windows-latest]
os: [macos-latest, windows-latest, ubuntu-22.04]
steps:
- uses: actions/checkout@v1
- name: check versions
Expand Down
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,5 @@ msvc/2015/TestTsLib/TestTsLib/settings.json
# CPack
CPackConfig.cmake

# Cached 3rd-party
3rd-party/googletest*
3rd-party/benchmark*

# Windows CPack
_CPack_Packages
_CPack_Packages
26 changes: 26 additions & 0 deletions .vscode/cmake-kits.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,31 @@
"name" : "Visual Studio 15 2017",
"platform": "x86"
}
},
{
"name": "MacOS-Clang-Debug-static-libs",
"cmakeSettings": {
"ENABLE_TESTS": "ON",
"ENABLE_COMPONENT_TESTS": "ON",
"BUILD_SHARED_LIBS": "OFF",
"CMAKE_BUILD_TYPE": "Debug"
},
"compilers" : {
"C": "/usr/bin/clang",
"CXX": "/usr/bin/clang++"
}
},
{
"name": "MacOS-Clang-Debug-dynamic-libs",
"cmakeSettings": {
"ENABLE_TESTS": "ON",
"ENABLE_COMPONENT_TESTS": "ON",
"BUILD_SHARED_LIBS": "ON",
"CMAKE_BUILD_TYPE": "Debug"
},
"compilers" : {
"C": "/usr/bin/clang",
"CXX": "/usr/bin/clang++"
}
}
]
24 changes: 12 additions & 12 deletions 3rd-party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ include(ExternalProject)
ExternalProject_Add(
plog
URL ${CMAKE_CURRENT_SOURCE_DIR}/plog-${PLOG_VERSION}.tar.gz
INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/plog-${PLOG_VERSION}
INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/plog-${PLOG_VERSION}
CMAKE_ARGS -D CMAKE_BUILD_TYPE=Release
-D CMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-D PLOG_BUILD_SAMPLES=OFF
Expand All @@ -50,7 +50,7 @@ ExternalProject_Add(
ExternalProject_Add(
json
URL ${CMAKE_CURRENT_SOURCE_DIR}/json-${NLOHMANN_VERSION}.tar.gz
INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/json-${NLOHMANN_VERSION}
INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/json-${NLOHMANN_VERSION}
CMAKE_ARGS -D CMAKE_BUILD_TYPE=Release
-D BUILD_TESTING=OFF
-D CMAKE_INSTALL_PREFIX=<INSTALL_DIR>
Expand All @@ -70,17 +70,17 @@ if(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY AND ENABLE_TESTS)
endif(APPLE)

# Download and unpack googletest at configure time
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists_googletest.txt.in ${CMAKE_CURRENT_SOURCE_DIR}/googletest-download/CMakeLists.txt)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists_googletest.txt.in ${CMAKE_CURRENT_BINARY_DIR}/googletest-download/CMakeLists.txt)
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
RESULT_VARIABLE result
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/googletest-download
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download
)
if(result)
message(FATAL_ERROR "CMake step for googletest failed: ${result}")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} --build .
RESULT_VARIABLE result
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/googletest-download )
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download )
if(result)
message(FATAL_ERROR "Build step for googletest failed: ${result}")
endif()
Expand All @@ -91,8 +91,8 @@ if(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY AND ENABLE_TESTS)

# Add googletest directly to our build. This defines
# the gtest and gtest_main targets.
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/googletest-src
${CMAKE_CURRENT_SOURCE_DIR}/googletest-build
add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src
${CMAKE_CURRENT_BINARY_DIR}/googletest-build
EXCLUDE_FROM_ALL)

# The gtest/gtest_main targets carry header search path
Expand All @@ -118,16 +118,16 @@ if(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY AND ENABLE_TESTS)
set(BENCHMARK_ENABLE_TESTING OFF)

# Download and unpack benchmark at configure time
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists_benchmark.txt.in ${CMAKE_CURRENT_SOURCE_DIR}/benchmark-download/CMakeLists.txt)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists_benchmark.txt.in ${CMAKE_CURRENT_BINARY_DIR}/benchmark-download/CMakeLists.txt)
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
RESULT_VARIABLE result
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/benchmark-download )
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/benchmark-download )
if(result)
message(FATAL_ERROR "CMake step for benchmark failed: ${result}")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} --build .
RESULT_VARIABLE result
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/benchmark-download )
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/benchmark-download )
if(result)
message(FATAL_ERROR "Build step for benchmark failed: ${result}")
endif()
Expand All @@ -139,8 +139,8 @@ if(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY AND ENABLE_TESTS)

# Add benchmark directly to our build. This defines
# the gtest and gtest_main targets.
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/benchmark-src
${CMAKE_CURRENT_SOURCE_DIR}/benchmark-build
add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/benchmark-src
${CMAKE_CURRENT_BINARY_DIR}/benchmark-build
EXCLUDE_FROM_ALL)

# The gtest/gtest_main targets carry header search path
Expand Down
6 changes: 3 additions & 3 deletions 3rd-party/CMakeLists_benchmark.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ project(benchmark-download NONE)
include(ExternalProject)
ExternalProject_Add(benchmark
GIT_REPOSITORY https://github.com/google/benchmark.git
GIT_TAG master
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/benchmark-src"
BINARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/benchmark-build"
GIT_TAG main
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/benchmark-src"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/benchmark-build"
GIT_SHALLOW 1
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
Expand Down
6 changes: 3 additions & 3 deletions 3rd-party/CMakeLists_googletest.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ project(googletest-download NONE)
include(ExternalProject)
ExternalProject_Add(googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG master
GIT_TAG main
GIT_SHALLOW 1
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/googletest-src"
BINARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/googletest-build"
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Releases

*V1.0.0*
* [x] Support Apple M chipset
* [x] Fix issue with google test
* [x] Fix isse not including last PES packet
* [x] Add CMake presets

*V0.6.0*
* [x] Add broader support
* [x] Fix emscripten with CMake
Expand Down
26 changes: 13 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ cmake_minimum_required(VERSION 3.5)
if(CMAKE_MINOR_VERSION GREATER 9)
project(
mpeg2ts
VERSION 0.6.0
VERSION 1.0.0
DESCRIPTION "Main project for MPEG-2 Parsing of transport streams"
LANGUAGES CXX
)
else()
project(
mpeg2ts
VERSION 0.6.0
VERSION 1.0.0
LANGUAGES CXX
)
endif()
Expand Down Expand Up @@ -115,7 +115,7 @@ if(ENABLE_TESTS)
add_subdirectory(bench)
endif()

if(MSVC OR APPLE)
if(MSVC)
set(ENABLE_COMPONENT_TESTS OFF)
endif()
if(ENABLE_COMPONENT_TESTS)
Expand All @@ -131,13 +131,13 @@ endif()
#-------------------
# compiler settings
#-------------------
if(NOT ENABLE_WEBASSEMBLY)
if (UNIX AND NOT APPLE)
add_compile_options(-Wuseless-cast # warn if you perform a cast to the same type
-Werror # Make the specified warning into an error.
)
endif()
endif()
#if(NOT ENABLE_WEBASSEMBLY)
# if (UNIX AND NOT APPLE)
# add_compile_options(-Wuseless-cast # warn if you perform a cast to the same type
# -Werror # Make the specified warning into an error.
# )
# endif()
#endif()

if (MSVC)
add_compile_options(/W4)
Expand Down Expand Up @@ -173,10 +173,10 @@ endif()


#-------------------
# 3rd-party
# Include 3rd-party
#-------------------
include_directories(3rd-party/json-${NLOHMANN_VERSION}/include)
include_directories(3rd-party/plog-${PLOG_VERSION}/include)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/3rd-party/json-${NLOHMANN_VERSION}/include)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/3rd-party/plog-${PLOG_VERSION}/include)


#-------------------
Expand Down
Loading

0 comments on commit 6a07389

Please sign in to comment.