From fd4c5dd23253c8c8662cbec6fa898f76fe7d2e5a Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 29 Mar 2021 14:58:56 +0200 Subject: [PATCH] Fix CMake version warning --- CMakeLists.txt | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 76f2b62..e21031b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ +cmake_minimum_required(VERSION 3.5) + project(minetestmapper CXX) -cmake_minimum_required(VERSION 2.6) -cmake_policy(SET CMP0003 NEW) set(VERSION_MAJOR 1) set(VERSION_MINOR 0) @@ -46,8 +46,6 @@ if(NOT CUSTOM_DOCDIR STREQUAL "") endif() #set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) -find_package(PkgConfig) -include(FindPackageHandleStandardArgs) # Libraries: gd @@ -61,18 +59,12 @@ endif(NOT LIBGD_LIBRARY OR NOT LIBGD_INCLUDE_DIR) # Libraries: zlib -find_library(ZLIB_LIBRARY z) -find_path(ZLIB_INCLUDE_DIR zlib.h) -message (STATUS "zlib library: ${ZLIB_LIBRARY}") -message (STATUS "zlib headers: ${ZLIB_INCLUDE_DIR}") -if(NOT ZLIB_LIBRARY OR NOT ZLIB_INCLUDE_DIR) - message(FATAL_ERROR "zlib not found!") -endif(NOT ZLIB_LIBRARY OR NOT ZLIB_INCLUDE_DIR) +find_package(ZLIB REQUIRED) # Libraries: sqlite3 find_library(SQLITE3_LIBRARY sqlite3) -find_path(SQLITE3_INCLUDE_DIR zlib.h) +find_path(SQLITE3_INCLUDE_DIR sqlite3.h) message (STATUS "sqlite3 library: ${SQLITE3_LIBRARY}") message (STATUS "sqlite3 headers: ${SQLITE3_INCLUDE_DIR}") if(NOT SQLITE3_LIBRARY OR NOT SQLITE3_INCLUDE_DIR)