Skip to content

Commit

Permalink
Made the CMake build work with older xxd.
Browse files Browse the repository at this point in the history
  • Loading branch information
zond committed May 18, 2024
1 parent e92ee29 commit 2bf77c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:
steps:
- name: Install dependencies
run: sudo apt install -y libogg-dev libvorbis-dev libflac-dev cmake ninja-build libasound2-dev libglfw3-dev libopus-dev
- name: Install modern xxd
run: (curl -O http://ftp.us.debian.org/debian/pool/main/v/vim/xxd_9.0.1378-2_amd64.deb && sudo dpkg -i xxd_9.0.1378-2_amd64.deb)
- name: Check out code
uses: actions/checkout@v3
- name: Configure
Expand Down
3 changes: 2 additions & 1 deletion cmake/visqol.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ target_include_directories(visqol_proto PUBLIC ${visqol_PROTO_DIR})
set(visqol_MODEL_H ${visqol_SOURCE_DIR}/src/include/libsvm_nu_svr_model.h)
add_custom_command(
OUTPUT ${visqol_MODEL_H}
COMMAND xxd -i -n visqol_model_bytes ${visqol_SOURCE_DIR}/model/libsvm_nu_svr_model.txt ${visqol_MODEL_H}
COMMAND sh -c "xxd -i ${visqol_SOURCE_DIR}/model/libsvm_nu_svr_model.txt | sed 's/\\w*libsvm_nu_svr_model_txt/visqol_model_bytes/' > ${visqol_MODEL_H}"
DEPENDS ${visqol_SOURCE_DIR}/model/libsvm_nu_svr_model.txt
VERBATIM
)
add_custom_target(visqol_model DEPENDS ${visqol_MODEL_H})

Expand Down

0 comments on commit 2bf77c8

Please sign in to comment.