Fix CMake version warning

This commit is contained in:
sfan5 2021-03-29 14:58:56 +02:00
parent fa5c63cfc8
commit fd4c5dd232

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.5)
project(minetestmapper CXX) project(minetestmapper CXX)
cmake_minimum_required(VERSION 2.6)
cmake_policy(SET CMP0003 NEW)
set(VERSION_MAJOR 1) set(VERSION_MAJOR 1)
set(VERSION_MINOR 0) set(VERSION_MINOR 0)
@ -46,8 +46,6 @@ if(NOT CUSTOM_DOCDIR STREQUAL "")
endif() endif()
#set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) #set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
find_package(PkgConfig)
include(FindPackageHandleStandardArgs)
# Libraries: gd # Libraries: gd
@ -61,18 +59,12 @@ endif(NOT LIBGD_LIBRARY OR NOT LIBGD_INCLUDE_DIR)
# Libraries: zlib # Libraries: zlib
find_library(ZLIB_LIBRARY z) find_package(ZLIB REQUIRED)
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)
# Libraries: sqlite3 # Libraries: sqlite3
find_library(SQLITE3_LIBRARY 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 library: ${SQLITE3_LIBRARY}")
message (STATUS "sqlite3 headers: ${SQLITE3_INCLUDE_DIR}") message (STATUS "sqlite3 headers: ${SQLITE3_INCLUDE_DIR}")
if(NOT SQLITE3_LIBRARY OR NOT SQLITE3_INCLUDE_DIR) if(NOT SQLITE3_LIBRARY OR NOT SQLITE3_INCLUDE_DIR)