aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorBoyuan Yang <byang@debian.org>2022-07-14 15:56:57 -0400
committerBoyuan Yang <byang@debian.org>2022-07-14 15:56:57 -0400
commitd4dbf19f6b0181ee78034bfe4caf189d1c016998 (patch)
tree47d5d28d2ab770a10e6c48788725c51dffeb84a9 /cmake
parent320ef65362608ee1148c299d8d5d7618af34e470 (diff)
downloadlibgav1-d4dbf19f6b0181ee78034bfe4caf189d1c016998.tar.gz
libgav1-d4dbf19f6b0181ee78034bfe4caf189d1c016998.tar.bz2
libgav1-d4dbf19f6b0181ee78034bfe4caf189d1c016998.zip
New upstream version 0.18.0
Diffstat (limited to 'cmake')
-rw-r--r--cmake/libgav1_build_definitions.cmake10
-rw-r--r--cmake/libgav1_install.cmake6
-rw-r--r--cmake/toolchains/android.cmake6
-rw-r--r--cmake/toolchains/arm-linux-gnueabihf.cmake7
4 files changed, 18 insertions, 11 deletions
diff --git a/cmake/libgav1_build_definitions.cmake b/cmake/libgav1_build_definitions.cmake
index 0d00bb6..95c17be 100644
--- a/cmake/libgav1_build_definitions.cmake
+++ b/cmake/libgav1_build_definitions.cmake
@@ -31,8 +31,8 @@ macro(libgav1_set_build_definitions)
# passed to libtool.
#
# We set LIBGAV1_SOVERSION = [c-a].a.r
- set(LT_CURRENT 0)
- set(LT_REVISION 1)
+ set(LT_CURRENT 1)
+ set(LT_REVISION 0)
set(LT_AGE 0)
math(EXPR LIBGAV1_SOVERSION_MAJOR "${LT_CURRENT} - ${LT_AGE}")
set(LIBGAV1_SOVERSION "${LIBGAV1_SOVERSION_MAJOR}.${LT_AGE}.${LT_REVISION}")
@@ -142,8 +142,10 @@ macro(libgav1_set_build_definitions)
if(NOT LIBGAV1_MAX_BITDEPTH)
set(LIBGAV1_MAX_BITDEPTH 10)
- elseif(NOT LIBGAV1_MAX_BITDEPTH EQUAL 8 AND NOT LIBGAV1_MAX_BITDEPTH EQUAL 10)
- libgav1_die("LIBGAV1_MAX_BITDEPTH must be 8 or 10.")
+ elseif(NOT LIBGAV1_MAX_BITDEPTH EQUAL 8
+ AND NOT LIBGAV1_MAX_BITDEPTH EQUAL 10
+ AND NOT LIBGAV1_MAX_BITDEPTH EQUAL 12)
+ libgav1_die("LIBGAV1_MAX_BITDEPTH must be 8, 10 or 12.")
endif()
list(APPEND libgav1_defines "LIBGAV1_MAX_BITDEPTH=${LIBGAV1_MAX_BITDEPTH}")
diff --git a/cmake/libgav1_install.cmake b/cmake/libgav1_install.cmake
index b7f6006..e2c79b9 100644
--- a/cmake/libgav1_install.cmake
+++ b/cmake/libgav1_install.cmake
@@ -48,8 +48,10 @@ macro(libgav1_setup_install_target)
FILES ${libgav1_api_includes}
DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/gav1")
- install(TARGETS gav1_decode DESTINATION
- "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
+ if(LIBGAV1_ENABLE_EXAMPLES)
+ install(TARGETS gav1_decode DESTINATION
+ "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
+ endif()
install(TARGETS libgav1_static DESTINATION
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
if(BUILD_SHARED_LIBS)
diff --git a/cmake/toolchains/android.cmake b/cmake/toolchains/android.cmake
index 492957b..b550397 100644
--- a/cmake/toolchains/android.cmake
+++ b/cmake/toolchains/android.cmake
@@ -30,9 +30,9 @@ if(NOT ANDROID_ABI)
set(ANDROID_ABI arm64-v8a)
endif()
-# Force arm mode for 32-bit targets (instead of the default thumb) to improve
-# performance.
-if(NOT ANDROID_ARM_MODE)
+# Force arm mode for 32-bit arm targets (instead of the default thumb) to
+# improve performance.
+if(ANDROID_ABI MATCHES "^armeabi" AND NOT ANDROID_ARM_MODE)
set(ANDROID_ARM_MODE arm)
endif()
diff --git a/cmake/toolchains/arm-linux-gnueabihf.cmake b/cmake/toolchains/arm-linux-gnueabihf.cmake
index 7448f54..7d58ce1 100644
--- a/cmake/toolchains/arm-linux-gnueabihf.cmake
+++ b/cmake/toolchains/arm-linux-gnueabihf.cmake
@@ -27,10 +27,13 @@ endif()
if(NOT CMAKE_C_COMPILER)
set(CMAKE_C_COMPILER ${CROSS}gcc)
endif()
-set(CMAKE_C_FLAGS_INIT "-march=armv7-a -marm")
+# Note: -march=armv7-a+fp is an alternative to -mfpu with newer versions of
+# gcc:
+# https://gcc.gnu.org/git/?p=gcc.git&a=commit;h=dff2abcbee65dbb4b7ca3ade0f7622ffdc0af391
+set(CMAKE_C_FLAGS_INIT "-march=armv7-a -marm -mfpu=vfpv3")
if(NOT CMAKE_CXX_COMPILER)
set(CMAKE_CXX_COMPILER ${CROSS}g++)
endif()
-set(CMAKE_CXX_FLAGS_INIT "-march=armv7-a -marm")
+set(CMAKE_CXX_FLAGS_INIT "-march=armv7-a -marm -mfpu=vfpv3")
set(CMAKE_SYSTEM_PROCESSOR "armv7")
set(LIBGAV1_NEON_INTRINSICS_FLAG "-mfpu=neon")