From b1242163f7e10c150d73ae702fa700cac9831bcc Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Wed, 19 Jun 2019 12:53:03 -0700 Subject: [PATCH] Make CMake 3.10 the minimum version, add LTO option (#1316) * Make CMake 3.10 the minimum version, add LTO option * Install a newer CMake on Linux CI builds * Update LLVM and Cmake on Windows CI * Update build/windows/ci-common.bat Co-Authored-By: Ben Doherty * Update formatting * Apply suggestions from code review * Update build/windows/ci-common.bat * Update CMake * Switch Android projects back to CMake 3.6 --- CMakeLists.txt | 20 +++++++++++++++++-- android/filamat-android/CMakeLists.txt | 2 +- android/filament-android/CMakeLists.txt | 2 +- android/gltfio-android/CMakeLists.txt | 2 +- build/linux/ci-common.sh | 18 ++++++++--------- build/windows/ci-common.bat | 16 ++++++++++++--- filament/CMakeLists.txt | 2 +- filament/backend/CMakeLists.txt | 2 +- filament/benchmark/CMakeLists.txt | 2 +- filament/test/CMakeLists.txt | 2 +- filament/tools/CMakeLists.txt | 2 +- java/filamat/CMakeLists.txt | 2 +- java/filament/CMakeLists.txt | 2 +- libs/bluegl/CMakeLists.txt | 2 +- libs/bluevk/CMakeLists.txt | 2 +- libs/filabridge/CMakeLists.txt | 2 +- libs/filaflat/CMakeLists.txt | 2 +- libs/filagui/CMakeLists.txt | 2 +- libs/filamat/CMakeLists.txt | 2 +- libs/filameshio/CMakeLists.txt | 2 +- libs/geometry/CMakeLists.txt | 2 +- libs/gltfio/CMakeLists.txt | 2 +- libs/ibl/CMakeLists.txt | 2 +- libs/image/CMakeLists.txt | 2 +- libs/imageio/CMakeLists.txt | 2 +- libs/math/CMakeLists.txt | 2 +- libs/rays/CMakeLists.txt | 2 +- libs/utils/CMakeLists.txt | 2 +- samples/CMakeLists.txt | 2 +- shaders/CMakeLists.txt | 2 +- third_party/OpenImageDenoise/CMakeLists.txt | 2 +- .../OpenImageDenoise/tnt/CMakeLists.txt | 2 +- third_party/astcenc/tnt/CMakeLists.txt | 2 +- third_party/benchmark/tnt/CMakeLists.txt | 2 +- third_party/cgltf/tnt/CMakeLists.txt | 2 +- third_party/etc2comp/CMakeLists.txt | 2 +- third_party/getopt/CMakeLists.txt | 2 +- third_party/glslang/tnt/CMakeLists.txt | 2 +- third_party/imgui/tnt/CMakeLists.txt | 2 +- third_party/libassimp/tnt/CMakeLists.txt | 2 +- third_party/libgtest/tnt/CMakeLists.txt | 2 +- third_party/libpng/tnt/CMakeLists.txt | 2 +- third_party/libsdl2/tnt/CMakeLists.txt | 2 +- third_party/libz/tnt/CMakeLists.txt | 2 +- third_party/meshoptimizer/CMakeLists.txt | 2 +- third_party/robin-map/tnt/CMakeLists.txt | 2 +- third_party/skylight/tnt/CMakeLists.txt | 2 +- third_party/smol-v/tnt/CMakeLists.txt | 2 +- third_party/spirv-cross/tnt/CMakeLists.txt | 2 +- third_party/spirv-tools/CMakeLists.txt | 2 +- third_party/stb/tnt/CMakeLists.txt | 2 +- third_party/tinyexr/tnt/CMakeLists.txt | 2 +- third_party/vkmemalloc/tnt/CMakeLists.txt | 2 +- third_party/xatlas/tnt/CMakeLists.txt | 2 +- tools/cmgen/CMakeLists.txt | 2 +- tools/filamesh/CMakeLists.txt | 2 +- tools/glslminifier/CMakeLists.txt | 2 +- tools/matc/CMakeLists.txt | 2 +- tools/matinfo/CMakeLists.txt | 2 +- tools/mipgen/CMakeLists.txt | 2 +- tools/normal-blending/CMakeLists.txt | 2 +- tools/resgen/CMakeLists.txt | 2 +- tools/roughness-prefilter/CMakeLists.txt | 2 +- tools/skygen/CMakeLists.txt | 2 +- tools/specular-color/CMakeLists.txt | 2 +- web/docs/CMakeLists.txt | 2 +- web/filament-js/CMakeLists.txt | 2 +- web/samples/CMakeLists.txt | 2 +- 68 files changed, 105 insertions(+), 79 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bcd74704bea..e855461b827 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # ================================================================================================== # CMake # ================================================================================================== -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) # ================================================================================================== # Project declaration @@ -18,6 +18,8 @@ option(USE_EXTERNAL_GLES3 "Experimental: Compile Filament against OpenGL ES 3" O option(GENERATE_JS_DOCS "Build WebGL documentation and tutorials" OFF) +option(ENABLE_LTO "Enable link-time optimizations if supported by the compiler" OFF) + # ================================================================================================== # OS specific # ================================================================================================== @@ -101,7 +103,7 @@ set(TOOLS ${CMAKE_CURRENT_SOURCE_DIR}/tools) # ================================================================================================== # Compiler check # ================================================================================================== -set(MIN_CLANG_VERSION "5.0") +set(MIN_CLANG_VERSION "6.0") if (CMAKE_C_COMPILER_ID MATCHES "Clang") if (CMAKE_C_COMPILER_VERSION VERSION_LESS MIN_CLANG_VERSION) @@ -124,6 +126,20 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND "${CMAKE_CXX_SIMULATE_ID}" S set(CLANG_CL true) endif() +# ================================================================================================== +# Link time optimizations (LTO) +# ================================================================================================== +if (ENABLE_LTO) + include(CheckIPOSupported) + + check_ipo_supported(RESULT IPO_SUPPORT) + + if (IPO_SUPPORT) + message(STATUS "LTO support is enabled") + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) + endif() +endif() + # ================================================================================================== # General compiler flags # ================================================================================================== diff --git a/android/filamat-android/CMakeLists.txt b/android/filamat-android/CMakeLists.txt index a9c9d67de25..cd3d4853264 100644 --- a/android/filamat-android/CMakeLists.txt +++ b/android/filamat-android/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.6) set(FILAMENT_DIR ${FILAMENT_DIST_DIR}) diff --git a/android/filament-android/CMakeLists.txt b/android/filament-android/CMakeLists.txt index 256417269fc..234ab1ffc92 100644 --- a/android/filament-android/CMakeLists.txt +++ b/android/filament-android/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.6) set(FILAMENT_DIR ${FILAMENT_DIST_DIR}) diff --git a/android/gltfio-android/CMakeLists.txt b/android/gltfio-android/CMakeLists.txt index a4455ee3b41..0ab01140135 100644 --- a/android/gltfio-android/CMakeLists.txt +++ b/android/gltfio-android/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.6) set(FILAMENT_DIR ${FILAMENT_DIST_DIR}) diff --git a/build/linux/ci-common.sh b/build/linux/ci-common.sh index 7f2da3a70ee..c6b06c22746 100755 --- a/build/linux/ci-common.sh +++ b/build/linux/ci-common.sh @@ -18,18 +18,18 @@ if [[ "$KOKORO_BUILD_ID" ]]; then if [[ "$FILAMENT_ANDROID_CI_BUILD" ]]; then # Update NDK yes | $ANDROID_HOME/tools/bin/sdkmanager "ndk-bundle" > /dev/null + fi - # Install CMake - mkdir -p cmake - cd cmake + # Install CMake + mkdir -p cmake + cd cmake - sudo wget https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-Linux-x86_64.sh - sudo chmod +x ./cmake-$CMAKE_VERSION-Linux-x86_64.sh - sudo ./cmake-$CMAKE_VERSION-Linux-x86_64.sh --skip-license > /dev/null - sudo update-alternatives --install /usr/bin/cmake cmake `pwd`/bin/cmake 1000 --force + sudo wget https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-Linux-x86_64.sh + sudo chmod +x ./cmake-$CMAKE_VERSION-Linux-x86_64.sh + sudo ./cmake-$CMAKE_VERSION-Linux-x86_64.sh --skip-license > /dev/null + sudo update-alternatives --install /usr/bin/cmake cmake `pwd`/bin/cmake 1000 --force - cd .. - fi + cd .. # Install clang # This may or may not be needed... diff --git a/build/windows/ci-common.bat b/build/windows/ci-common.bat index 04aa65c676b..529a3f6f6de 100644 --- a/build/windows/ci-common.bat +++ b/build/windows/ci-common.bat @@ -1,13 +1,23 @@ if defined KOKORO_BUILD_ID ( - choco install llvm --version 6.0.1 -y + choco install cmake -y :: retry if choco install failed if errorlevel 1 ( - choco install llvm --version 6.0.1 -y + choco install cmake -y if errorlevel 1 exit /b %errorlevel% ) - :: refreshenv is necessary to put LLVM on path + refreshenv + + choco install llvm --version 8.0.0 -y + + :: retry if choco install failed + if errorlevel 1 ( + choco install llvm --version 8.0.8 -y + if errorlevel 1 exit /b %errorlevel% + ) + + :: refreshenv is necessary to put CMake and LLVM on path refreshenv ) diff --git a/filament/CMakeLists.txt b/filament/CMakeLists.txt index bacb8b0d3eb..5b39b38305d 100644 --- a/filament/CMakeLists.txt +++ b/filament/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(filament C ASM) set(TARGET filament) diff --git a/filament/backend/CMakeLists.txt b/filament/backend/CMakeLists.txt index 9a37d28953d..a5b0bf0a844 100644 --- a/filament/backend/CMakeLists.txt +++ b/filament/backend/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(filament C ASM) set(TARGET backend) diff --git a/filament/benchmark/CMakeLists.txt b/filament/benchmark/CMakeLists.txt index ac27fa7e394..a0cfd98e285 100644 --- a/filament/benchmark/CMakeLists.txt +++ b/filament/benchmark/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(filament-benchmarks) # ================================================================================================== diff --git a/filament/test/CMakeLists.txt b/filament/test/CMakeLists.txt index e52f93ef08b..68642665a9d 100644 --- a/filament/test/CMakeLists.txt +++ b/filament/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(filament-tests) # ================================================================================================== diff --git a/filament/tools/CMakeLists.txt b/filament/tools/CMakeLists.txt index c924f07fb75..2a671a2c9d4 100644 --- a/filament/tools/CMakeLists.txt +++ b/filament/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(ssaogen) set(TARGET ssaogen) diff --git a/java/filamat/CMakeLists.txt b/java/filamat/CMakeLists.txt index e3fcb30a1ca..4a6829704d6 100644 --- a/java/filamat/CMakeLists.txt +++ b/java/filamat/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.10) project(filament-java) if (NOT ENABLE_JAVA) diff --git a/java/filament/CMakeLists.txt b/java/filament/CMakeLists.txt index 3d38d4044d1..0d42b164ab1 100644 --- a/java/filament/CMakeLists.txt +++ b/java/filament/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.10) project(filament-java) if (NOT ENABLE_JAVA) diff --git a/libs/bluegl/CMakeLists.txt b/libs/bluegl/CMakeLists.txt index 09f34415cc4..d63cb4e7d0b 100644 --- a/libs/bluegl/CMakeLists.txt +++ b/libs/bluegl/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(bluegl ASM) set(TARGET bluegl) diff --git a/libs/bluevk/CMakeLists.txt b/libs/bluevk/CMakeLists.txt index 643b8e4de98..ac087619741 100644 --- a/libs/bluevk/CMakeLists.txt +++ b/libs/bluevk/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(bluevk) set(TARGET bluevk) diff --git a/libs/filabridge/CMakeLists.txt b/libs/filabridge/CMakeLists.txt index ab7ded7a827..ce4a40f34de 100644 --- a/libs/filabridge/CMakeLists.txt +++ b/libs/filabridge/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(filabridge) set(TARGET filabridge) diff --git a/libs/filaflat/CMakeLists.txt b/libs/filaflat/CMakeLists.txt index 5ccf6054988..2abe3f88f0b 100644 --- a/libs/filaflat/CMakeLists.txt +++ b/libs/filaflat/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(filaflat) set(TARGET filaflat) diff --git a/libs/filagui/CMakeLists.txt b/libs/filagui/CMakeLists.txt index 30847d47e31..10894eb936d 100644 --- a/libs/filagui/CMakeLists.txt +++ b/libs/filagui/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(filagui) set(TARGET filagui) diff --git a/libs/filamat/CMakeLists.txt b/libs/filamat/CMakeLists.txt index 8e3e624dc82..2b59013f10f 100644 --- a/libs/filamat/CMakeLists.txt +++ b/libs/filamat/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(filamat) set(TARGET filamat) diff --git a/libs/filameshio/CMakeLists.txt b/libs/filameshio/CMakeLists.txt index ce8b5f58173..7fc5152c3e0 100644 --- a/libs/filameshio/CMakeLists.txt +++ b/libs/filameshio/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(filameshio) set(TARGET filameshio) diff --git a/libs/geometry/CMakeLists.txt b/libs/geometry/CMakeLists.txt index 0012fdb6a3c..cd72cc80e8c 100644 --- a/libs/geometry/CMakeLists.txt +++ b/libs/geometry/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(geometry) set(TARGET geometry) diff --git a/libs/gltfio/CMakeLists.txt b/libs/gltfio/CMakeLists.txt index efaee1bbdba..70d024fd3b9 100644 --- a/libs/gltfio/CMakeLists.txt +++ b/libs/gltfio/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(gltfio C ASM) set(TARGET gltfio) diff --git a/libs/ibl/CMakeLists.txt b/libs/ibl/CMakeLists.txt index 7e020edd731..c2c1c2dd9d6 100644 --- a/libs/ibl/CMakeLists.txt +++ b/libs/ibl/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(cmgen) set(TARGET ibl) diff --git a/libs/image/CMakeLists.txt b/libs/image/CMakeLists.txt index e9f45a3972c..9949e115371 100644 --- a/libs/image/CMakeLists.txt +++ b/libs/image/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(image) set(TARGET image) diff --git a/libs/imageio/CMakeLists.txt b/libs/imageio/CMakeLists.txt index 0b31c1b6a8d..1cb64c3ebf9 100644 --- a/libs/imageio/CMakeLists.txt +++ b/libs/imageio/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(imageio) set(TARGET imageio) diff --git a/libs/math/CMakeLists.txt b/libs/math/CMakeLists.txt index 573e9b26f3f..c5bd2ee09b1 100644 --- a/libs/math/CMakeLists.txt +++ b/libs/math/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(math) set(TARGET math) diff --git a/libs/rays/CMakeLists.txt b/libs/rays/CMakeLists.txt index 4c54e7d33d6..cf456346598 100644 --- a/libs/rays/CMakeLists.txt +++ b/libs/rays/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(rays) set(TARGET rays) diff --git a/libs/utils/CMakeLists.txt b/libs/utils/CMakeLists.txt index 32ee971d402..18d8d4696f6 100644 --- a/libs/utils/CMakeLists.txt +++ b/libs/utils/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(utils) set(TARGET utils) diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index fda364986bb..96108ed4ae0 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(filament-samples C ASM) set(ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) diff --git a/shaders/CMakeLists.txt b/shaders/CMakeLists.txt index c0cf03c057c..1ba5183c0c8 100644 --- a/shaders/CMakeLists.txt +++ b/shaders/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(shaders C ASM) set(TARGET shaders) diff --git a/third_party/OpenImageDenoise/CMakeLists.txt b/third_party/OpenImageDenoise/CMakeLists.txt index 4b8f535d7fe..c50ff697936 100644 --- a/third_party/OpenImageDenoise/CMakeLists.txt +++ b/third_party/OpenImageDenoise/CMakeLists.txt @@ -14,7 +14,7 @@ ## limitations under the License. ## ## ======================================================================== ## -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) set(OIDN_VERSION_MAJOR 0) set(OIDN_VERSION_MINOR 9) diff --git a/third_party/OpenImageDenoise/tnt/CMakeLists.txt b/third_party/OpenImageDenoise/tnt/CMakeLists.txt index c19fbc15ecc..438c78e03db 100644 --- a/third_party/OpenImageDenoise/tnt/CMakeLists.txt +++ b/third_party/OpenImageDenoise/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) set_property(GLOBAL PROPERTY USE_FOLDERS ON) set(OIDN_VERSION_MAJOR 0) diff --git a/third_party/astcenc/tnt/CMakeLists.txt b/third_party/astcenc/tnt/CMakeLists.txt index 8bd5caf9671..23bf23ba206 100644 --- a/third_party/astcenc/tnt/CMakeLists.txt +++ b/third_party/astcenc/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(astcenc) set(TARGET astcenc) diff --git a/third_party/benchmark/tnt/CMakeLists.txt b/third_party/benchmark/tnt/CMakeLists.txt index f9ee6eaa62d..df08fb33fbe 100644 --- a/third_party/benchmark/tnt/CMakeLists.txt +++ b/third_party/benchmark/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(benchmark) set(OUR_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) diff --git a/third_party/cgltf/tnt/CMakeLists.txt b/third_party/cgltf/tnt/CMakeLists.txt index 073522817c6..27590da2c53 100644 --- a/third_party/cgltf/tnt/CMakeLists.txt +++ b/third_party/cgltf/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(cgltf) set(TARGET cgltf) diff --git a/third_party/etc2comp/CMakeLists.txt b/third_party/etc2comp/CMakeLists.txt index bba5428222a..791e67001e8 100644 --- a/third_party/etc2comp/CMakeLists.txt +++ b/third_party/etc2comp/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 2.8.9) +cmake_minimum_required(VERSION 3.10) project(EtcTest) set (CMAKE_CXX_STANDARD 11) diff --git a/third_party/getopt/CMakeLists.txt b/third_party/getopt/CMakeLists.txt index 343f5039f68..b96f789c56e 100755 --- a/third_party/getopt/CMakeLists.txt +++ b/third_party/getopt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(getopt) set(TARGET getopt) diff --git a/third_party/glslang/tnt/CMakeLists.txt b/third_party/glslang/tnt/CMakeLists.txt index ede72549bc7..62b6c2f12d1 100644 --- a/third_party/glslang/tnt/CMakeLists.txt +++ b/third_party/glslang/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.10) set_property(GLOBAL PROPERTY USE_FOLDERS ON) # Adhere to GNU filesystem layout conventions diff --git a/third_party/imgui/tnt/CMakeLists.txt b/third_party/imgui/tnt/CMakeLists.txt index 7733f3e730d..3d41086968c 100644 --- a/third_party/imgui/tnt/CMakeLists.txt +++ b/third_party/imgui/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(imgui) set(OUR_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) diff --git a/third_party/libassimp/tnt/CMakeLists.txt b/third_party/libassimp/tnt/CMakeLists.txt index 8a83073246e..72213b9fbc5 100644 --- a/third_party/libassimp/tnt/CMakeLists.txt +++ b/third_party/libassimp/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(assimp) set(OUR_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) diff --git a/third_party/libgtest/tnt/CMakeLists.txt b/third_party/libgtest/tnt/CMakeLists.txt index 4c90257fc82..189a6ade8d7 100644 --- a/third_party/libgtest/tnt/CMakeLists.txt +++ b/third_party/libgtest/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(gtest) set(OUR_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) diff --git a/third_party/libpng/tnt/CMakeLists.txt b/third_party/libpng/tnt/CMakeLists.txt index 763e05b9d3b..cca526cb715 100644 --- a/third_party/libpng/tnt/CMakeLists.txt +++ b/third_party/libpng/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(png) set(OUR_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) diff --git a/third_party/libsdl2/tnt/CMakeLists.txt b/third_party/libsdl2/tnt/CMakeLists.txt index 2b43a74dec6..6565de0cb6a 100755 --- a/third_party/libsdl2/tnt/CMakeLists.txt +++ b/third_party/libsdl2/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(sdl2 C) # This is necessary on Windows, so the sdl2.dll lives next to the sample apps that use it diff --git a/third_party/libz/tnt/CMakeLists.txt b/third_party/libz/tnt/CMakeLists.txt index 86f05dc3f12..cc706ee1bd0 100644 --- a/third_party/libz/tnt/CMakeLists.txt +++ b/third_party/libz/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(z) set(OUR_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) diff --git a/third_party/meshoptimizer/CMakeLists.txt b/third_party/meshoptimizer/CMakeLists.txt index 3416b074d20..b0ebaff2159 100644 --- a/third_party/meshoptimizer/CMakeLists.txt +++ b/third_party/meshoptimizer/CMakeLists.txt @@ -1,5 +1,5 @@ project(meshoptimizer) -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.10) option(BUILD_DEMO "Build demo" OFF) diff --git a/third_party/robin-map/tnt/CMakeLists.txt b/third_party/robin-map/tnt/CMakeLists.txt index 3b6b5363f87..f2a9a644823 100644 --- a/third_party/robin-map/tnt/CMakeLists.txt +++ b/third_party/robin-map/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(tsl) set(TARGET tsl) diff --git a/third_party/skylight/tnt/CMakeLists.txt b/third_party/skylight/tnt/CMakeLists.txt index fb619afaaea..b335ac5f16c 100644 --- a/third_party/skylight/tnt/CMakeLists.txt +++ b/third_party/skylight/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(skylight) set(OUR_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) diff --git a/third_party/smol-v/tnt/CMakeLists.txt b/third_party/smol-v/tnt/CMakeLists.txt index cc2a381d675..10d94d36f4a 100644 --- a/third_party/smol-v/tnt/CMakeLists.txt +++ b/third_party/smol-v/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(smol-v) set(TARGET smol-v) diff --git a/third_party/spirv-cross/tnt/CMakeLists.txt b/third_party/spirv-cross/tnt/CMakeLists.txt index ec5661c999d..ec589a6a524 100644 --- a/third_party/spirv-cross/tnt/CMakeLists.txt +++ b/third_party/spirv-cross/tnt/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(SPIRV-Cross) # Use assertions instead of exceptions so we can succesfully compile with -fno-exceptions. diff --git a/third_party/spirv-tools/CMakeLists.txt b/third_party/spirv-tools/CMakeLists.txt index 4ad160aba3e..6ed79a134c3 100755 --- a/third_party/spirv-tools/CMakeLists.txt +++ b/third_party/spirv-tools/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.10) if (POLICY CMP0048) cmake_policy(SET CMP0048 NEW) endif() diff --git a/third_party/stb/tnt/CMakeLists.txt b/third_party/stb/tnt/CMakeLists.txt index e1c2be9d0a7..8a9852db6ca 100644 --- a/third_party/stb/tnt/CMakeLists.txt +++ b/third_party/stb/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(stb) set(TARGET stb) diff --git a/third_party/tinyexr/tnt/CMakeLists.txt b/third_party/tinyexr/tnt/CMakeLists.txt index 41902d51395..a34b2569f35 100644 --- a/third_party/tinyexr/tnt/CMakeLists.txt +++ b/third_party/tinyexr/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(tinyexr) set(TARGET tinyexr) diff --git a/third_party/vkmemalloc/tnt/CMakeLists.txt b/third_party/vkmemalloc/tnt/CMakeLists.txt index 436cf1959d8..30c35f7e371 100644 --- a/third_party/vkmemalloc/tnt/CMakeLists.txt +++ b/third_party/vkmemalloc/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(vkmemalloc) set(TARGET vkmemalloc) diff --git a/third_party/xatlas/tnt/CMakeLists.txt b/third_party/xatlas/tnt/CMakeLists.txt index a647bae37bd..b851f2520ea 100644 --- a/third_party/xatlas/tnt/CMakeLists.txt +++ b/third_party/xatlas/tnt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(xatlas) set(TARGET xatlas) diff --git a/tools/cmgen/CMakeLists.txt b/tools/cmgen/CMakeLists.txt index 7c59c2f5699..5cdb6c778db 100644 --- a/tools/cmgen/CMakeLists.txt +++ b/tools/cmgen/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(cmgen) set(TARGET cmgen) diff --git a/tools/filamesh/CMakeLists.txt b/tools/filamesh/CMakeLists.txt index 70b6d738636..055d30ab99e 100644 --- a/tools/filamesh/CMakeLists.txt +++ b/tools/filamesh/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(filamesh) set(TARGET filamesh) diff --git a/tools/glslminifier/CMakeLists.txt b/tools/glslminifier/CMakeLists.txt index 36189bbec81..41f43424fc2 100644 --- a/tools/glslminifier/CMakeLists.txt +++ b/tools/glslminifier/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(glslminifier) set(TARGET glslminifier) diff --git a/tools/matc/CMakeLists.txt b/tools/matc/CMakeLists.txt index 5a9d1f2f14f..d16729fbe9a 100644 --- a/tools/matc/CMakeLists.txt +++ b/tools/matc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) # ================================================================================================== # Library diff --git a/tools/matinfo/CMakeLists.txt b/tools/matinfo/CMakeLists.txt index c7506f4fb9b..8fb3a2987ed 100644 --- a/tools/matinfo/CMakeLists.txt +++ b/tools/matinfo/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(matinfo) set(TARGET matinfo) diff --git a/tools/mipgen/CMakeLists.txt b/tools/mipgen/CMakeLists.txt index 28d3bde31de..2c76b655dc0 100644 --- a/tools/mipgen/CMakeLists.txt +++ b/tools/mipgen/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(mipgen) set(TARGET mipgen) diff --git a/tools/normal-blending/CMakeLists.txt b/tools/normal-blending/CMakeLists.txt index fe33f67ddef..b01e056e4f5 100644 --- a/tools/normal-blending/CMakeLists.txt +++ b/tools/normal-blending/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(normal-blending) set(TARGET normal-blending) diff --git a/tools/resgen/CMakeLists.txt b/tools/resgen/CMakeLists.txt index 1cb598430d9..b7dd505c696 100644 --- a/tools/resgen/CMakeLists.txt +++ b/tools/resgen/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(resgen) set(TARGET resgen) diff --git a/tools/roughness-prefilter/CMakeLists.txt b/tools/roughness-prefilter/CMakeLists.txt index dfcc096dec7..99b3559678f 100644 --- a/tools/roughness-prefilter/CMakeLists.txt +++ b/tools/roughness-prefilter/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(roughness-prefilter) set(TARGET roughness-prefilter) diff --git a/tools/skygen/CMakeLists.txt b/tools/skygen/CMakeLists.txt index ddb40c1a357..c334bd0c21b 100644 --- a/tools/skygen/CMakeLists.txt +++ b/tools/skygen/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(skygen) set(TARGET skygen) diff --git a/tools/specular-color/CMakeLists.txt b/tools/specular-color/CMakeLists.txt index 9b2908481ef..7a56ce340e4 100644 --- a/tools/specular-color/CMakeLists.txt +++ b/tools/specular-color/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(specular-color) set(TARGET specular-color) diff --git a/web/docs/CMakeLists.txt b/web/docs/CMakeLists.txt index f7e7e3e6b63..3567a921083 100644 --- a/web/docs/CMakeLists.txt +++ b/web/docs/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.10) project(webdocs) # We do not use CMake's find_package facility because it can't find homebrew-installed python3, diff --git a/web/filament-js/CMakeLists.txt b/web/filament-js/CMakeLists.txt index de5109c82f6..ffab0eaec54 100644 --- a/web/filament-js/CMakeLists.txt +++ b/web/filament-js/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(filament-js) diff --git a/web/samples/CMakeLists.txt b/web/samples/CMakeLists.txt index 2664c7f3f07..74f4e611547 100644 --- a/web/samples/CMakeLists.txt +++ b/web/samples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.10) project(websamples) set(SERVER_DIR ${PROJECT_BINARY_DIR})