Skip to content

Commit

Permalink
Fix CMake version warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Mar 29, 2021
1 parent fa5c63c commit c12861a
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions 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)
Expand Down Expand Up @@ -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

Expand All @@ -61,23 +59,11 @@ 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)
message (STATUS "sqlite3 library: ${SQLITE3_LIBRARY}")
message (STATUS "sqlite3 headers: ${SQLITE3_INCLUDE_DIR}")
if(NOT SQLITE3_LIBRARY OR NOT SQLITE3_INCLUDE_DIR)
message(FATAL_ERROR "sqlite3 not found!")
endif(NOT SQLITE3_LIBRARY OR NOT SQLITE3_INCLUDE_DIR)
find_package(SQLite3 REQUIRED)

# Libraries: postgresql

Expand Down Expand Up @@ -145,7 +131,7 @@ include_directories(
"${PROJECT_BINARY_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_BINARY_DIR}"
${SQLITE3_INCLUDE_DIR}
${SQLite3_INCLUDE_DIR}
${LIBGD_INCLUDE_DIR}
${ZLIB_INCLUDE_DIR}
)
Expand Down Expand Up @@ -186,7 +172,7 @@ add_executable(minetestmapper

target_link_libraries(
minetestmapper
${SQLITE3_LIBRARY}
${SQLite3_LIBRARY}
${PostgreSQL_LIBRARIES}
${LEVELDB_LIBRARY}
${REDIS_LIBRARY}
Expand Down

0 comments on commit c12861a

Please sign in to comment.