File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed
Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ option(WITH_TIFF "Use TIFFs as a cache backend" OFF)
7676option (WITH_TIFF_WRITE_SUPPORT "Enable (experimental) support for writable TIFF cache backends" OFF )
7777option (WITH_GEOTIFF "Allow GeoTIFF metadata creation for TIFF cache backends" OFF )
7878option (WITH_PCRE "Use PCRE for regex tests" OFF )
79+ option (WITH_MAPSERVER "Enable (experimental) support for the mapserver library" OFF )
7980
8081find_package (PNG)
8182if (PNG_FOUND)
@@ -212,6 +213,17 @@ if(WITH_GEOTIFF)
212213 endif (GEOTIFF_FOUND)
213214endif (WITH_GEOTIFF)
214215
216+ if (WITH_MAPSERVER)
217+ find_package (MAPSERVER)
218+ if (MAPSERVER_FOUND)
219+ include_directories (${MAPSERVER_INCLUDE_DIR} )
220+ target_link_libraries (mapcache ${MAPSERVER_LIBRARY} )
221+ set (USE_MAPSERVER 1)
222+ else (MAPSERVER_FOUND)
223+ report_optional_not_found(MAPSERVER)
224+ endif (MAPSERVER_FOUND)
225+ endif (WITH_MAPSERVER)
226+
215227
216228if (UNIX )
217229target_link_libraries (mapcache ${CMAKE_DL_LIBS} m )
@@ -259,6 +271,7 @@ status_optional_component("TIFF" "${USE_TIFF}" "${TIFF_LIBRARY}")
259271status_optional_component("GeoTIFF" "${USE_GEOTIFF} " "${GEOTIFF_LIBRARY} " )
260272status_optional_component("Experimental TIFF write support" "${USE_TIFF_WRITE} " "${TIFF_LIBRARY} " )
261273status_optional_component("PCRE" "${USE_PCRE} " "${PCRE_LIBRARY} " )
274+ status_optional_component("Experimental mapserver support" "${USE_MAPSERVER} " "${MAPSERVER_LIBRARY} " )
262275
263276INSTALL (TARGETS mapcache DESTINATION ${CMAKE_INSTALL_LIBDIR} )
264277
Original file line number Diff line number Diff line change 1+
2+ FIND_PATH (MAPSERVER_INCLUDE_DIR
3+ NAMES mapserver.h
4+ PATH_SUFFIXES mapserver
5+ )
6+
7+ FIND_LIBRARY (MAPSERVER_LIBRARY
8+ NAMES mapserver
9+ )
10+
11+ set (MAPSERVER_INCLUDE_DIRS ${MAPSERVER_INCLUDE_DIR} )
12+ set (MAPSERVER_LIBRARIES ${MAPSERVER_LIBRARY} )
13+ include (FindPackageHandleStandardArgs)
14+ find_package_handle_standard_args(MAPSERVER DEFAULT_MSG MAPSERVER_LIBRARY MAPSERVER_INCLUDE_DIR)
15+ mark_as_advanced (MAPSERVER_LIBRARY MAPSERVER_INCLUDE_DIR)
Original file line number Diff line number Diff line change 1010#cmakedefine USE_TIFF_WRITE 1
1111#cmakedefine USE_GEOTIFF 1
1212#cmakedefine USE_PCRE 1
13+ #cmakedefine USE_MAPSERVER 1
1314
1415#cmakedefine HAVE_STRNCASECMP 1
1516#cmakedefine HAVE_SYMLINK 1
You can’t perform that action at this time.
0 commit comments