1
+ cmake_minimum_required (VERSION 3.5)
2
+
1
3
project (minetestmapper CXX)
2
- cmake_minimum_required (VERSION 2.6)
3
- cmake_policy (SET CMP0003 NEW)
4
4
5
5
set (VERSION_MAJOR 1)
6
6
set (VERSION_MINOR 0)
@@ -46,8 +46,6 @@ if(NOT CUSTOM_DOCDIR STREQUAL "")
46
46
endif ()
47
47
48
48
#set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
49
- find_package (PkgConfig)
50
- include (FindPackageHandleStandardArgs)
51
49
52
50
# Libraries: gd
53
51
@@ -61,23 +59,11 @@ endif(NOT LIBGD_LIBRARY OR NOT LIBGD_INCLUDE_DIR)
61
59
62
60
# Libraries: zlib
63
61
64
- find_library (ZLIB_LIBRARY z)
65
- find_path (ZLIB_INCLUDE_DIR zlib.h)
66
- message (STATUS "zlib library: ${ZLIB_LIBRARY} " )
67
- message (STATUS "zlib headers: ${ZLIB_INCLUDE_DIR} " )
68
- if (NOT ZLIB_LIBRARY OR NOT ZLIB_INCLUDE_DIR)
69
- message (FATAL_ERROR "zlib not found!" )
70
- endif (NOT ZLIB_LIBRARY OR NOT ZLIB_INCLUDE_DIR)
62
+ find_package (ZLIB REQUIRED)
71
63
72
64
# Libraries: sqlite3
73
65
74
- find_library (SQLITE3_LIBRARY sqlite3)
75
- find_path (SQLITE3_INCLUDE_DIR zlib.h)
76
- message (STATUS "sqlite3 library: ${SQLITE3_LIBRARY} " )
77
- message (STATUS "sqlite3 headers: ${SQLITE3_INCLUDE_DIR} " )
78
- if (NOT SQLITE3_LIBRARY OR NOT SQLITE3_INCLUDE_DIR)
79
- message (FATAL_ERROR "sqlite3 not found!" )
80
- endif (NOT SQLITE3_LIBRARY OR NOT SQLITE3_INCLUDE_DIR)
66
+ find_package (SQLite3 REQUIRED)
81
67
82
68
# Libraries: postgresql
83
69
@@ -145,7 +131,7 @@ include_directories(
145
131
"${PROJECT_BINARY_DIR} "
146
132
"${CMAKE_CURRENT_SOURCE_DIR} /include"
147
133
"${CMAKE_CURRENT_BINARY_DIR} "
148
- ${SQLITE3_INCLUDE_DIR }
134
+ ${SQLite3_INCLUDE_DIR }
149
135
${LIBGD_INCLUDE_DIR}
150
136
${ZLIB_INCLUDE_DIR}
151
137
)
@@ -186,7 +172,7 @@ add_executable(minetestmapper
186
172
187
173
target_link_libraries (
188
174
minetestmapper
189
- ${SQLITE3_LIBRARY }
175
+ ${SQLite3_LIBRARY }
190
176
${PostgreSQL_LIBRARIES}
191
177
${LEVELDB_LIBRARY}
192
178
${REDIS_LIBRARY}
0 commit comments