forked from OSGeo/gdal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
130 lines (117 loc) · 3.69 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# CMake4GDAL project is distributed under MIT license. See accompanying file LICENSE.txt.
add_library(
alg OBJECT
contour.cpp
delaunay.c
gdal_crs.cpp
gdal_octave.cpp
gdal_rpc.cpp
gdal_tps.cpp
gdalapplyverticalshiftgrid.cpp
gdalchecksum.cpp
gdalcutline.cpp
gdaldither.cpp
gdalgeoloc.cpp
gdalgeolocquadtree.cpp
gdalgrid.cpp
gdallinearsystem.cpp
gdalmatching.cpp
gdalmediancut.cpp
gdalpansharpen.cpp
gdalproximity.cpp
gdalrasterize.cpp
gdalrasterpolygonenumerator.cpp
gdalsievefilter.cpp
gdalsimplewarp.cpp
gdaltransformer.cpp
gdaltransformgeolocs.cpp
gdalwarper.cpp
gdalwarpkernel.cpp
gdalwarpoperation.cpp
llrasterize.cpp
los.cpp
polygonize.cpp
polygonize_polygonizer_impl.cpp
rasterfill.cpp
thinplatespline.cpp
gdal_simplesurf.cpp
viewshed/combiner.cpp
viewshed/cumulative.cpp
viewshed/progress.cpp
viewshed/util.cpp
viewshed/viewshed.cpp
viewshed/viewshed_executor.cpp
gdalgenericinverse.cpp
gdal_interpolateatpoint.cpp
)
add_dependencies(alg generate_gdal_version_h)
include(GdalStandardIncludes)
include(GdalDriverHelper)
gdal_standard_includes(alg)
target_compile_options(alg PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${GDAL_CXX_WARNING_FLAGS} ${WFLAG_OLD_STYLE_CAST}
${WFLAG_EFFCXX}>)
target_compile_options(alg PRIVATE $<$<COMPILE_LANGUAGE:C>:${GDAL_C_WARNING_FLAGS}>)
target_include_directories(
alg PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/marching_squares>
$<TARGET_PROPERTY:gdal_vrt,SOURCE_DIR> $<TARGET_PROPERTY:gdal_MEM,SOURCE_DIR>)
set_property(TARGET alg PROPERTY POSITION_INDEPENDENT_CODE ${GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE})
target_sources(${GDAL_LIB_TARGET_NAME} PRIVATE $<TARGET_OBJECTS:alg>)
if (GDAL_ENABLE_DRIVER_GTIFF)
target_include_directories(alg PRIVATE $<TARGET_PROPERTY:gdal_GTIFF,SOURCE_DIR>)
endif()
if (GDAL_USE_GEOS)
target_compile_definitions(alg PRIVATE -DHAVE_GEOS=1)
gdal_target_link_libraries(alg PRIVATE ${GEOS_TARGET})
endif ()
if (GDAL_USE_ARMADILLO)
target_include_directories(alg PRIVATE ${ARMADILLO_INCLUDE_DIRS})
target_compile_definitions(alg PRIVATE -DHAVE_ARMADILLO)
gdal_target_link_libraries(alg PRIVATE ${ARMADILLO_LIBRARIES})
endif ()
if (GDAL_USE_OPENCL)
gdal_target_link_libraries(alg PRIVATE OpenCL::OpenCL)
target_compile_definitions(alg PRIVATE -DHAVE_OPENCL)
target_sources(alg PRIVATE gdalwarpkernel_opencl.h gdalwarpkernel_opencl.cpp)
endif ()
gdal_target_link_libraries(alg PRIVATE PROJ::proj)
if (GDAL_USE_QHULL_INTERNAL)
target_compile_definitions(alg PRIVATE -DINTERNAL_QHULL)
target_sources(alg PRIVATE internal_qhull_headers.h)
target_include_directories(alg PRIVATE internal_libqhull)
elseif (GDAL_USE_QHULL)
target_compile_definitions(alg PRIVATE -DEXTERNAL_QHULL)
target_include_directories(alg PRIVATE ${QHULL_INCLUDE_DIR})
gdal_target_link_libraries(alg PRIVATE ${QHULL_LIBRARY})
endif ()
if (HAVE_SSE_AT_COMPILE_TIME)
target_sources(alg PRIVATE gdalgridsse.cpp)
target_compile_definitions(alg PRIVATE -DHAVE_SSE_AT_COMPILE_TIME)
if (NOT "${GDAL_SSE_FLAG}" STREQUAL "")
set_property(
SOURCE gdalgridsse.cpp
APPEND
PROPERTY COMPILE_FLAGS ${GDAL_SSE_FLAG})
endif ()
endif ()
if (HAVE_AVX_AT_COMPILE_TIME)
target_sources(alg PRIVATE gdalgridavx.cpp)
target_compile_definitions(alg PRIVATE -DHAVE_AVX_AT_COMPILE_TIME)
if (NOT "${GDAL_AVX_FLAG}" STREQUAL "")
set_property(
SOURCE gdalgridavx.cpp
APPEND
PROPERTY COMPILE_FLAGS ${GDAL_AVX_FLAG})
endif ()
endif ()
include(TargetPublicHeader)
target_public_header(
TARGET
gdal
HEADERS
gdal_alg.h
gdal_alg_priv.h
gdalgrid.h
gdalgrid_priv.h
gdalwarper.h
gdal_simplesurf.h
gdalpansharpen.h)