diff options
author | Boyuan Yang <byang@debian.org> | 2021-11-07 08:50:18 -0500 |
---|---|---|
committer | Boyuan Yang <byang@debian.org> | 2021-11-07 08:50:18 -0500 |
commit | 320ef65362608ee1148c299d8d5d7618af34e470 (patch) | |
tree | c47911c219d1e35b8b0771e9e0176eff0e0d08ec /CMakeLists.txt | |
parent | 2381d803c76105f44717d75f089ec37f51e5cfe4 (diff) | |
download | libgav1-320ef65362608ee1148c299d8d5d7618af34e470.tar.gz libgav1-320ef65362608ee1148c299d8d5d7618af34e470.tar.bz2 libgav1-320ef65362608ee1148c299d8d5d7618af34e470.zip |
New upstream version 0.17.0
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e9e17a..4029de1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,8 +18,10 @@ cmake_minimum_required(VERSION 3.7.1 FATAL_ERROR) # libgav1 requires C++11. set(CMAKE_CXX_STANDARD 11) set(ABSL_CXX_STANDARD 11) +# libgav1 requires C99. +set(CMAKE_C_STANDARD 99) -project(libgav1 CXX) +project(libgav1 CXX C) set(libgav1_root "${CMAKE_CURRENT_SOURCE_DIR}") set(libgav1_build "${CMAKE_BINARY_DIR}") @@ -56,6 +58,12 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() +# Enable generators like Xcode and Visual Studio to place projects in folders. +get_property(use_folders_is_set GLOBAL PROPERTY USE_FOLDERS SET) +if(NOT use_folders_is_set) + set_property(GLOBAL PROPERTY USE_FOLDERS TRUE) +endif() + include(FindThreads) include("${libgav1_examples}/libgav1_examples.cmake") @@ -126,6 +134,7 @@ if(NOT EXISTS "${libgav1_abseil}") " clone \\\n" " https://github.com/abseil/abseil-cpp.git third_party/abseil-cpp") endif() +set(ABSL_PROPAGATE_CXX_STD ON) add_subdirectory("${libgav1_abseil}" "${libgav1_abseil_build}" EXCLUDE_FROM_ALL) libgav1_reset_target_lists() @@ -136,6 +145,12 @@ libgav1_add_tests_targets() libgav1_add_utils_targets() libgav1_setup_install_target() +if(LIBGAV1_ENABLE_TESTS) + # include(CTest) or -DBUILD_TESTING=1 aren't used to avoid enabling abseil + # tests. + enable_testing() +endif() + if(LIBGAV1_VERBOSE) libgav1_dump_cmake_flag_variables() libgav1_dump_tracked_configuration_variables() |