From fabf32faefa31cf9856c2e06dd8ea5fb39b2e946 Mon Sep 17 00:00:00 2001 From: Jan-E Date: Sat, 26 Jun 2021 18:08:42 +0200 Subject: [PATCH 1/2] Build static avif.lib and aom.lib --- .github/workflows/build.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.ps1 b/.github/workflows/build.ps1 index 1b2371f..a4b867b 100644 --- a/.github/workflows/build.ps1 +++ b/.github/workflows/build.ps1 @@ -25,10 +25,10 @@ $on = if ($architecture -eq "x64") {"1"} else {"0"} cmake "-G" "$generator" "-A" "$platform" "-DENABLE_DOCS=0" "-DENABLE_EXAMPLES=0" "-DENABLE_TESTDATA=0" "-DENABLE_TESTS=0" "-DENABLE_TOOLS=0" "-DENABLE_NASM=1" "-DENABLE_SSE2=$on" "-DENABLE_SSE3=$on" "-DENABLE_SSSE3=$on" "-DENABLE_SSE4_1=$on" "-DENABLE_SSE4_2=$on" "-DENABLE_AVX=$on" "-DENABLE_AVX2=$on" ".." msbuild "/t:Build" "/p:Configuration=Release" "/p:Platform=$platform" "AOM.sln" xcopy "Release\*.lib" "." +xcopy ".\aom.lib" "..\..\..\winlibs\lib\" Set-Location "..\..\.." -cmake "$generator" -A "$platform" -DAVIF_CODEC_AOM=1 -DAVIF_LOCAL_AOM=1 -DAVIF_ENABLE_WERROR=0 . -msbuild "/t:Build" "/p:Configuration=Release" "/p:Platform=$platform" "libavif.sln" -xcopy "Release\avif.dll" "winlibs\bin\*" +cmake "$generator" -A "$platform" -DAVIF_CODEC_AOM=1 -DAVIF_LOCAL_AOM=1 -DAVIF_ENABLE_WERROR=0 -DBUILD_SHARED_LIBS=0 . +msbuild "/t:Build" "/p:Configuration=RelWithDebInfo" "/p:Platform=$platform" "libavif.sln" xcopy "include\avif\avif.h" "winlibs\include\avif\*" -xcopy "Release\avif.lib" "winlibs\lib\*" +xcopy "RelWithDebInfo\avif*.??b" "winlibs\lib\*" From 7806dfe3d301753f44ef1fecb349b42c9781e3c3 Mon Sep 17 00:00:00 2001 From: Jan-E Date: Sat, 26 Jun 2021 18:25:44 +0200 Subject: [PATCH 2/2] Build static avif_a.lib and aom_a.lib --- .github/workflows/build.ps1 | 3 ++- CMakeLists.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.ps1 b/.github/workflows/build.ps1 index a4b867b..21a2fb1 100644 --- a/.github/workflows/build.ps1 +++ b/.github/workflows/build.ps1 @@ -25,7 +25,8 @@ $on = if ($architecture -eq "x64") {"1"} else {"0"} cmake "-G" "$generator" "-A" "$platform" "-DENABLE_DOCS=0" "-DENABLE_EXAMPLES=0" "-DENABLE_TESTDATA=0" "-DENABLE_TESTS=0" "-DENABLE_TOOLS=0" "-DENABLE_NASM=1" "-DENABLE_SSE2=$on" "-DENABLE_SSE3=$on" "-DENABLE_SSSE3=$on" "-DENABLE_SSE4_1=$on" "-DENABLE_SSE4_2=$on" "-DENABLE_AVX=$on" "-DENABLE_AVX2=$on" ".." msbuild "/t:Build" "/p:Configuration=Release" "/p:Platform=$platform" "AOM.sln" xcopy "Release\*.lib" "." -xcopy ".\aom.lib" "..\..\..\winlibs\lib\" +xcopy "Release\aom.lib" ".\aom_a.lib*" +xcopy ".\aom_a.lib" "..\..\..\winlibs\lib\" Set-Location "..\..\.." cmake "$generator" -A "$platform" -DAVIF_CODEC_AOM=1 -DAVIF_LOCAL_AOM=1 -DAVIF_ENABLE_WERROR=0 -DBUILD_SHARED_LIBS=0 . diff --git a/CMakeLists.txt b/CMakeLists.txt index 83f0214..4cc54ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,7 @@ set(LIBRARY_VERSION "${LIBRARY_VERSION_MAJOR}.${LIBRARY_VERSION_MINOR}.${LIBRARY set(LIBRARY_SOVERSION ${LIBRARY_VERSION_MAJOR}) option(BUILD_SHARED_LIBS "Build shared avif library" ON) +set(CMAKE_STATIC_LIBRARY_SUFFIX "_a.lib") option(AVIF_ENABLE_WERROR "Treat all compiler warnings as errors" ON)