Skip to content

Commit

Permalink
CMake/boilerplate updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Daft-Freak committed Feb 6, 2021
1 parent d525032 commit 63a581c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/main/build
run: cmake $GITHUB_WORKSPACE/main -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=`pwd` ${{matrix.cmake-args}}
run: cmake $GITHUB_WORKSPACE/main -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCPACK_PACKAGE_FILE_NAME=${{env.RELEASE_FILE}} ${{matrix.cmake-args}}

# And then run the build itself
- name: Build
Expand All @@ -105,9 +105,8 @@ jobs:
shell: bash
working-directory: ${{runner.workspace}}/main/build
run: |
cmake --build . --target install
tar -zcf ${RELEASE_FILE}.tar.gz bin/
7z a ${RELEASE_FILE}.zip bin/*
cmake --build . --target package
# Push the tar file to the release
- name: Upload tar
if: github.event_name == 'release' && matrix.release-suffix != ''
Expand Down
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Basic parameters; check that these match your project / environment
cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.9)

project(mjpeg-player)
set(32BLIT_PATH "../" CACHE PATH "Path to 32blit.cmake")
set(PROJECT_SOURCE
avi-file.cpp
mjpeg-player.cpp
)
set(PROJECT_DISTRIBS LICENSE README.md)

#set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address")

Expand All @@ -30,3 +31,9 @@ blit_metadata (${PROJECT_NAME} metadata.yml)
target_link_libraries (${PROJECT_NAME} DUH)

add_custom_target (flash DEPENDS ${PROJECT_NAME}.flash)

# setup release packages
install (FILES ${PROJECT_DISTRIBS} DESTINATION .)
set (CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
set (CPACK_GENERATOR "ZIP" "TGZ")
include (CPack)

0 comments on commit 63a581c

Please sign in to comment.