Skip to content

Commit

Permalink
Fix some tests.
Browse files Browse the repository at this point in the history
- add cmp and convert utilities.
- use m with gcc and pthreads with clang
  • Loading branch information
vrabaud committed Nov 24, 2023
1 parent dfe9790 commit 8fd85dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
21 changes: 2 additions & 19 deletions .github/workflows/ci-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ jobs:
pacboy: >-
aom:p
cmake:p
diffutils:p
cc:p
dav1d:p
imagemagick:p
libjpeg-turbo:p
libpng:p
libyuv:p
Expand Down Expand Up @@ -76,22 +78,3 @@ jobs:
- name: Run AVIF Tests
working-directory: ./build
run: ctest -j $Env:NUMBER_OF_PROCESSORS --output-on-failure
- name: Install AVIF
working-directory: ./build
run: ninja install
- name: Test installed cmake
working-directory: ./build
run: >
mkdir test && cd test
echo "cmake_minimum_required(VERSION 3.13)
project(FindPackageTest)
message(STATUS ${CMAKE_PREFIX_PATH})
find_package(libavif REQUIRED)
if(TARGET avif)
message(STATUS "\""avif found"\"")
else()
message(FATAL_ERROR "\""avif not found"\"")
endif()" >> CMakeLists.txt
cmake . -DCMAKE_PREFIX_PATH=../install
7 changes: 2 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -431,14 +431,11 @@ endif()
# /usr/local/include.
set(CMAKE_FIND_FRAMEWORK LAST)

if(UNIX OR (MINGW AND CMAKE_C_COMPILER_ID MATCHES "Clang"))
if(UNIX OR MINGW)
# Find out if we have threading available
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads)
set(AVIF_PLATFORM_LIBRARIES ${AVIF_PLATFORM_LIBRARIES} Threads::Threads)
endif()
if(UNIX)
set(AVIF_PLATFORM_LIBRARIES ${AVIF_PLATFORM_LIBRARIES} m)
set(AVIF_PLATFORM_LIBRARIES ${AVIF_PLATFORM_LIBRARIES} m Threads::Threads)
endif()

set(AVIF_CODEC_DEFINITIONS)
Expand Down

0 comments on commit 8fd85dd

Please sign in to comment.