@@ -119,7 +119,6 @@ int main(int argc, char **argv) {
119
119
include_directories (${CMAKE_CURRENT_BINARY_DIR} )
120
120
121
121
#options suported by the cmake builder
122
- option (WITH_PROJ "Choose if reprojection support should be built in" ON )
123
122
option (WITH_PROTOBUFC "Choose if protocol buffers support should be built in (required for vector tiles)" ON )
124
123
option (WITH_KML "Enable native KML output support (requires libxml2 support)" OFF )
125
124
option (WITH_SOS "Enable SOS Server support (requires PROJ and libxml2 support)" OFF )
@@ -134,8 +133,6 @@ option(WITH_MYSQL "Choose if MYSQL joining support should be built in" OFF)
134
133
option (WITH_FCGI "Choose if FastCGI support should be built in" ON )
135
134
option (WITH_GEOS "Choose if GEOS geometry operations support should be built in" ON )
136
135
option (WITH_POSTGIS "Choose if Postgis input support should be built in" ON )
137
- option (WITH_GDAL "Choose if GDAL input raster support should be built in" ON )
138
- option (WITH_OGR "Choose if OGR/GDAL input vector support should be built in" ON )
139
136
option (WITH_CLIENT_WMS "Enable Client WMS Layer support (requires CURL and GDAL support)" OFF )
140
137
option (WITH_CLIENT_WFS "Enable Client WMS Layer support (requires CURL and OGR support)" OFF )
141
138
option (WITH_CURL "Enable Curl HTTP support (required for wms/wfs client, and remote SLD)" OFF )
@@ -388,17 +385,14 @@ ms_link_libraries( ${FREETYPE_LIBRARY})
388
385
list (APPEND ALL_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIR} )
389
386
390
387
391
- if (WITH_PROJ)
392
- find_package (Proj)
393
- if (NOT PROJ_FOUND)
394
- report_optional_not_found(PROJ)
395
- else (NOT PROJ_FOUND)
396
- include_directories (${PROJ_INCLUDE_DIR} )
397
- ms_link_libraries( ${PROJ_LIBRARY} )
398
- list (APPEND ALL_INCLUDE_DIRS ${PROJ_INCLUDE_DIR} )
399
- set (USE_PROJ 1)
400
- endif (NOT PROJ_FOUND)
401
- endif (WITH_PROJ)
388
+ find_package (Proj)
389
+ if (NOT PROJ_FOUND)
390
+ report_mandatory_not_found(PROJ)
391
+ endif (NOT PROJ_FOUND)
392
+
393
+ include_directories (${PROJ_INCLUDE_DIR} )
394
+ ms_link_libraries( ${PROJ_LIBRARY} )
395
+ list (APPEND ALL_INCLUDE_DIRS ${PROJ_INCLUDE_DIR} )
402
396
403
397
if (USE_PBF)
404
398
include_directories (${PROJECT_BINARY_DIR} /renderers/mvt)
@@ -419,11 +413,7 @@ if(WITH_PIXMAN)
419
413
endif (WITH_PIXMAN)
420
414
421
415
if (WITH_WMS)
422
- if (USE_PROJ)
423
- set (USE_WMS_SVR 1)
424
- else (USE_PROJ)
425
- report_dependency_error(WMS PROJ)
426
- endif (USE_PROJ)
416
+ set (USE_WMS_SVR 1)
427
417
endif (WITH_WMS)
428
418
429
419
if (WITH_FRIBIDI)
@@ -591,17 +581,14 @@ if(WITH_POSTGIS)
591
581
endif (POSTGRESQL_FOUND)
592
582
endif (WITH_POSTGIS)
593
583
594
- if (WITH_GDAL)
595
- find_package (GDAL)
596
- if (GDAL_FOUND)
597
- include_directories (${GDAL_INCLUDE_DIR} )
598
- ms_link_libraries( ${GDAL_LIBRARY} )
599
- list (APPEND ALL_INCLUDE_DIRS ${GDAL_INCLUDE_DIR} )
600
- set (USE_GDAL 1)
601
- else (GDAL_FOUND)
602
- report_optional_not_found(GDAL)
603
- endif (GDAL_FOUND)
604
- endif (WITH_GDAL)
584
+ find_package (GDAL)
585
+ if (NOT GDAL_FOUND)
586
+ report_mandatory_not_found(GDAL)
587
+ endif (NOT GDAL_FOUND)
588
+
589
+ include_directories (${GDAL_INCLUDE_DIR} )
590
+ ms_link_libraries( ${GDAL_LIBRARY} )
591
+ list (APPEND ALL_INCLUDE_DIRS ${GDAL_INCLUDE_DIR} )
605
592
606
593
if (WITH_SVGCAIRO)
607
594
if (WITH_RSVG)
@@ -636,25 +623,6 @@ if(WITH_RSVG)
636
623
endif (RSVG_FOUND AND GOBJECT_FOUND)
637
624
endif (WITH_RSVG)
638
625
639
- if (WITH_OGR)
640
- if (GDAL_FOUND)
641
- set (USE_OGR 1)
642
- else (GDAL_FOUND)
643
- find_package (GDAL)
644
- if (GDAL_FOUND)
645
- include_directories (${GDAL_INCLUDE_DIR} )
646
- ms_link_libraries( ${GDAL_LIBRARY} )
647
- list (APPEND ALL_INCLUDE_DIRS ${GDAL_INCLUDE_DIR} )
648
- set (USE_OGR 1)
649
- else (GDAL_FOUND)
650
- message (SEND_ERROR "GDAL library could not be found and is needed for OGR support.
651
- HINTS:
652
- - disable OGR support by adding -DWITH_OGR=0
653
- - add the GDAL install directory to the CMAKE_PREFIX_PATH variable (-DCMAKE_PREFIX_PATH=\" /path/to/${component} -install-dir;/path/to/other/dirs\" " )
654
- endif (GDAL_FOUND)
655
- endif (GDAL_FOUND)
656
- endif (WITH_OGR)
657
-
658
626
if (WITH_CLIENT_WMS OR WITH_CLIENT_WFS)
659
627
set (WITH_CURL ON )
660
628
endif (WITH_CLIENT_WMS OR WITH_CLIENT_WFS)
@@ -683,56 +651,19 @@ if(WITH_CLIENT_WMS OR WITH_CLIENT_WFS)
683
651
endif (WITH_CLIENT_WMS OR WITH_CLIENT_WFS)
684
652
685
653
if (WITH_CLIENT_WMS)
686
- if (USE_GDAL AND USE_PROJ)
687
- set (USE_WMS_LYR 1)
688
- else (USE_GDAL AND USE_PROJ)
689
- if (NOT USE_GDAL)
690
- report_dependency_error(CLIENT_WMS GDAL)
691
- endif (NOT USE_GDAL)
692
- if ( NOT USE_PROJ)
693
- report_dependency_error(CLIENT_WMS PROJ)
694
- endif (NOT USE_PROJ)
695
- endif (USE_GDAL AND USE_PROJ)
654
+ set (USE_WMS_LYR 1)
696
655
endif (WITH_CLIENT_WMS)
697
656
698
657
if (WITH_CLIENT_WFS)
699
- if (USE_OGR AND USE_PROJ)
700
- set (USE_WFS_LYR 1)
701
- else (USE_OGR AND USE_PROJ)
702
- if (NOT USE_OGR)
703
- report_dependency_error(CLIENT_WFS OGR)
704
- endif (NOT USE_OGR)
705
- if ( NOT USE_PROJ)
706
- report_dependency_error(CLIENT_WFS PROJ)
707
- endif (NOT USE_PROJ)
708
- endif (USE_OGR AND USE_PROJ)
658
+ set (USE_WFS_LYR 1)
709
659
endif (WITH_CLIENT_WFS)
710
660
711
661
if (WITH_WFS)
712
- if (USE_PROJ AND USE_OGR)
713
- set (USE_WFS_SVR 1)
714
- #TODO: set WFS_USE_LIBXML2 ?
715
- else (USE_PROJ AND USE_OGR)
716
- if ( NOT USE_OGR)
717
- report_dependency_error(WFS OGR)
718
- endif ( NOT USE_OGR)
719
- if ( NOT USE_PROJ)
720
- report_dependency_error(WFS PROJ)
721
- endif ( NOT USE_PROJ)
722
- endif (USE_PROJ AND USE_OGR)
662
+ set (USE_WFS_SVR 1)
723
663
endif (WITH_WFS)
724
664
725
665
if (WITH_WCS)
726
- if (USE_PROJ AND USE_GDAL)
727
- set (USE_WCS_SVR 1)
728
- else (USE_PROJ AND USE_GDAL)
729
- if (NOT USE_GDAL)
730
- report_dependency_error(WCS GDAL)
731
- endif (NOT USE_GDAL)
732
- if (NOT USE_PROJ)
733
- report_dependency_error(WCS PROJ)
734
- endif (NOT USE_PROJ)
735
- endif (USE_PROJ AND USE_GDAL)
666
+ set (USE_WCS_SVR 1)
736
667
endif (WITH_WCS)
737
668
738
669
if (WITH_LIBXML2)
@@ -758,20 +689,11 @@ if( USE_WFS_SVR AND NOT USE_LIBXML2 )
758
689
endif ( USE_WFS_SVR AND NOT USE_LIBXML2 )
759
690
760
691
if (WITH_SOS)
761
- if (NOT USE_OGR)
762
- report_dependency_error(WITH_SOS OGR)
763
- endif (NOT USE_OGR)
764
-
765
- if (USE_PROJ AND USE_LIBXML2)
692
+ if (USE_LIBXML2)
766
693
set (USE_SOS_SVR 1)
767
- else (USE_PROJ AND USE_LIBXML2)
768
- if (NOT USE_LIBXML2)
769
- report_dependency_error(SOS LIBXML2)
770
- endif (NOT USE_LIBXML2)
771
- if (NOT USE_PROJ)
772
- report_dependency_error(SOS PROJ)
773
- endif (NOT USE_PROJ)
774
- endif (USE_PROJ AND USE_LIBXML2)
694
+ else (USE_LIBXML2)
695
+ report_dependency_error(SOS LIBXML2)
696
+ endif (USE_LIBXML2)
775
697
endif (WITH_SOS)
776
698
777
699
if (WITH_POINT_Z_M)
@@ -944,12 +866,12 @@ endmacro()
944
866
945
867
message (STATUS "* Summary of configured options for this build" )
946
868
message (STATUS " * Mandatory components" )
869
+ message (STATUS " * GDAL: ${GDAL_LIBRARY} " )
870
+ message (STATUS " * PROJ: ${PROJ_LIBRARY} " )
947
871
message (STATUS " * png: ${PNG_LIBRARY} " )
948
872
message (STATUS " * jpeg: ${JPEG_LIBRARY} " )
949
873
message (STATUS " * freetype: ${FREETYPE_LIBRARY} " )
950
874
message (STATUS " * Optional components" )
951
- status_optional_component("GDAL" "${USE_GDAL} " "${GDAL_LIBRARY} " )
952
- status_optional_component("OGR" "${USE_OGR} " "${GDAL_LIBRARY} " )
953
875
status_optional_component("GIF" "${USE_GIF} " "${GIF_LIBRARY} " )
954
876
status_optional_component("MYSQL" "${USE_MYSQL} " "${MYSQL_LIBRARY} " )
955
877
status_optional_component("FRIBIDI" "${USE_FRIBIDI} " "${FRIBIDI_LIBRARY} " )
@@ -959,7 +881,6 @@ status_optional_component("CAIRO" "${USE_CAIRO}" "${CAIRO_LIBRARY}")
959
881
status_optional_component("SVGCAIRO" "${USE_SVG_CAIRO} " "${SVGCAIRO_LIBRARY} " )
960
882
status_optional_component("RSVG" "${USE_RSVG} " "${RSVG_LIBRARY} " )
961
883
status_optional_component("CURL" "${USE_CURL} " "${CURL_LIBRARY} " )
962
- status_optional_component("PROJ" "${USE_PROJ} " "${PROJ_LIBRARY} " )
963
884
status_optional_component("PIXMAN" "${USE_PIXMAN} " "${PIXMAN_LIBRARY} " )
964
885
status_optional_component("LIBXML2" "${USE_LIBXML2} " "${LIBXML2_LIBRARY} " )
965
886
status_optional_component("POSTGIS" "${USE_POSTGIS} " "${POSTGRESQL_LIBRARY} " )
0 commit comments