Skip to content

Commit

Permalink
Add cmake format check CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
maryla-uc committed Jan 2, 2025
1 parent 7a2a40c commit ceab040
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ jobs:
style: file
sources: "apps/*.c,apps/**/*.h,apps/**/*.c,apps/**/*.cc,examples/*.c,include/avif/*.h,src/*.c,tests/*.c,tests/**/*.h,tests/**/*.cc"
excludes: "apps/shared/iccjpeg.h,apps/shared/iccjpeg.c"

cmake-format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: neg-c/[email protected]
with:
exclude: libavif.pc.cmake
5 changes: 4 additions & 1 deletion cmake/Modules/LocalLibargparse.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ else()
GIT_REPOSITORY "https://github.com/kmurray/libargparse.git"
GIT_TAG ${AVIF_LOCAL_LIBARGPARSE_GIT_TAG}
# TODO(vrabaud) remove once CMake 3.13 is not supported anymore.
PATCH_COMMAND sed -i.bak -e "s:install.*:include(GNUInstallDirs)\\\\ninstall(TARGETS libargparse RUNTIME DESTINATION \\\\$\\\\{CMAKE_INSTALL_BINDIR\\\\} LIBRARY DESTINATION \\\\$\\\\{CMAKE_INSTALL_LIBDIR\\\\} ARCHIVE DESTINATION \\\\$\\\\{CMAKE_INSTALL_LIBDIR\\\\}):" CMakeLists.txt
PATCH_COMMAND
sed -i.bak -e
"s:install.*:include(GNUInstallDirs)\\\\ninstall(TARGETS libargparse RUNTIME DESTINATION \\\\$\\\\{CMAKE_INSTALL_BINDIR\\\\} LIBRARY DESTINATION \\\\$\\\\{CMAKE_INSTALL_LIBDIR\\\\} ARCHIVE DESTINATION \\\\$\\\\{CMAKE_INSTALL_LIBDIR\\\\}):"
CMakeLists.txt
UPDATE_COMMAND ""
)
avif_fetchcontent_populate_cmake(libargparse)
Expand Down

0 comments on commit ceab040

Please sign in to comment.