From 883f46662d02fb50bc11dffdc4be1cc8e34fa8e1 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Fri, 20 Aug 2021 13:42:10 +0200 Subject: [PATCH] Fix warnings when newer CMake is used. project() call should always come AFTER cmake_minimum_required(). This caused various hard-to-debug issues when searching for packages. Newer CMake versions complain that compatibility is broken with v2.6 --- cmake/modules/FindDBus.cmake | 2 +- src/Shiny/CMakeLists.txt | 2 +- src/admesh/CMakeLists.txt | 2 +- src/boost/CMakeLists.txt | 2 +- src/clipper/CMakeLists.txt | 2 +- src/glu-libtess/CMakeLists.txt | 2 +- src/imgui/CMakeLists.txt | 2 +- src/libigl/CMakeLists.txt | 2 +- src/miniz/CMakeLists.txt | 2 +- src/semver/CMakeLists.txt | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmake/modules/FindDBus.cmake b/cmake/modules/FindDBus.cmake index 1d0f29dd7..d54d4e516 100644 --- a/cmake/modules/FindDBus.cmake +++ b/cmake/modules/FindDBus.cmake @@ -56,4 +56,4 @@ FIND_PATH(DBUS_ARCH_INCLUDE_DIR SET(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR}) INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBUS REQUIRED_VARS DBUS_INCLUDE_DIRS DBUS_LIBRARIES) \ No newline at end of file +FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBus REQUIRED_VARS DBUS_INCLUDE_DIRS DBUS_LIBRARIES) \ No newline at end of file diff --git a/src/Shiny/CMakeLists.txt b/src/Shiny/CMakeLists.txt index 8be7592ae..abdb96a72 100644 --- a/src/Shiny/CMakeLists.txt +++ b/src/Shiny/CMakeLists.txt @@ -1,5 +1,5 @@ +cmake_minimum_required(VERSION 2.8.12) project(Shiny) -cmake_minimum_required(VERSION 2.6) add_library(Shiny STATIC Shiny.h diff --git a/src/admesh/CMakeLists.txt b/src/admesh/CMakeLists.txt index 7d0177782..217976318 100644 --- a/src/admesh/CMakeLists.txt +++ b/src/admesh/CMakeLists.txt @@ -1,5 +1,5 @@ +cmake_minimum_required(VERSION 2.8.12) project(admesh) -cmake_minimum_required(VERSION 2.6) add_library(admesh STATIC connect.cpp diff --git a/src/boost/CMakeLists.txt b/src/boost/CMakeLists.txt index 12fe6b4e5..e8c9e11ce 100644 --- a/src/boost/CMakeLists.txt +++ b/src/boost/CMakeLists.txt @@ -1,5 +1,5 @@ +cmake_minimum_required(VERSION 2.8.12) project(nowide) -cmake_minimum_required(VERSION 2.6) add_library(nowide STATIC nowide/args.hpp diff --git a/src/clipper/CMakeLists.txt b/src/clipper/CMakeLists.txt index 0362a4d84..f62508820 100644 --- a/src/clipper/CMakeLists.txt +++ b/src/clipper/CMakeLists.txt @@ -1,5 +1,5 @@ +cmake_minimum_required(VERSION 2.8.12) project(clipper) -cmake_minimum_required(VERSION 2.6) add_library(clipper STATIC # We are using ClipperLib compiled as part of the libslic3r project using Slic3r::Point as its base type. diff --git a/src/glu-libtess/CMakeLists.txt b/src/glu-libtess/CMakeLists.txt index f3f8d024a..8fca992a3 100644 --- a/src/glu-libtess/CMakeLists.txt +++ b/src/glu-libtess/CMakeLists.txt @@ -1,5 +1,5 @@ +cmake_minimum_required(VERSION 2.8.12) project(glu-libtess) -cmake_minimum_required(VERSION 2.6) add_library(glu-libtess STATIC src/dict-list.h diff --git a/src/imgui/CMakeLists.txt b/src/imgui/CMakeLists.txt index 50575308d..235afe110 100644 --- a/src/imgui/CMakeLists.txt +++ b/src/imgui/CMakeLists.txt @@ -1,5 +1,5 @@ +cmake_minimum_required(VERSION 2.8.12) project(imgui) -cmake_minimum_required(VERSION 2.6) add_library(imgui STATIC imconfig.h diff --git a/src/libigl/CMakeLists.txt b/src/libigl/CMakeLists.txt index 3daac757b..f023826a5 100644 --- a/src/libigl/CMakeLists.txt +++ b/src/libigl/CMakeLists.txt @@ -1,5 +1,5 @@ -project(libigl) cmake_minimum_required(VERSION 3.0) +project(libigl) add_library(libigl INTERFACE) diff --git a/src/miniz/CMakeLists.txt b/src/miniz/CMakeLists.txt index ab27067d0..a664f7460 100644 --- a/src/miniz/CMakeLists.txt +++ b/src/miniz/CMakeLists.txt @@ -1,5 +1,5 @@ +cmake_minimum_required(VERSION 2.8.12) project(miniz) -cmake_minimum_required(VERSION 2.6) add_library(miniz INTERFACE) diff --git a/src/semver/CMakeLists.txt b/src/semver/CMakeLists.txt index c273121d4..4b61a7456 100644 --- a/src/semver/CMakeLists.txt +++ b/src/semver/CMakeLists.txt @@ -1,5 +1,5 @@ +cmake_minimum_required(VERSION 2.8.12) project(semver) -cmake_minimum_required(VERSION 2.6) add_library(semver STATIC semver.c