~ubuntu-branches/ubuntu/trusty/mapcache/trusty

« back to all changes in this revision

Viewing changes to util/CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2013-09-11 19:16:06 UTC
  • Revision ID: package-import@ubuntu.com-20130911191606-9aydo919w4dgjx9v
Tags: upstream-1.2.0
ImportĀ upstreamĀ versionĀ 1.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
option(WITH_GEOS "Choose if GEOS geometry operations support should be built in" ON)
 
2
option(WITH_OGR "Choose if OGR/GDAL input vector support should be built in" ON)
 
3
 
 
4
add_executable(mapcache_seed mapcache_seed.c)
 
5
target_link_libraries(mapcache_seed mapcache)
 
6
 
 
7
if(WITH_OGR)
 
8
  find_package(GDAL)
 
9
  if(GDAL_FOUND)
 
10
    include_directories(${GDAL_INCLUDE_DIR})
 
11
    target_link_libraries(mapcache_seed ${GDAL_LIBRARY})
 
12
    set (USE_OGR 1)
 
13
  else(GDAL_FOUND)
 
14
    #TODO:message here could be more precise: we need the GDAL library but we don't need to force gdal support
 
15
    report_dependency_error(GDAL OGR)
 
16
  endif(GDAL_FOUND)
 
17
endif(WITH_OGR)
 
18
 
 
19
 
 
20
if(WITH_GEOS)
 
21
  find_package(GEOS)
 
22
  if(GEOS_FOUND)
 
23
    include_directories(${GEOS_INCLUDE_DIR})
 
24
    target_link_libraries(mapcache_seed ${GEOS_LIBRARY})
 
25
    set (USE_GEOS 1)
 
26
  else(GEOS_FOUND)
 
27
    report_optional_not_found(GEOS)
 
28
  endif(GEOS_FOUND)
 
29
endif (WITH_GEOS)
 
30
 
 
31
  
 
32
configure_file (
 
33
  "${PROJECT_SOURCE_DIR}/util/mapcache-util-config.h.in"
 
34
  "${PROJECT_BINARY_DIR}/util/mapcache-util-config.h"
 
35
  )
 
36
include_directories("${PROJECT_BINARY_DIR}/util/")
 
37
 
 
38
 
 
39
message(STATUS "* Seeder Configuration Options:")
 
40
status_optional_component("GEOS" "${USE_GEOS}" "${GEOS_LIBRARY}")
 
41
status_optional_component("OGR" "${USE_OGR}" "${GDAL_LIBRARY}")
 
42
 
 
43
INSTALL(TARGETS mapcache_seed RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})