Debian Codegraph @

ogr/ogrsf_frmts/arrow/CMakeLists.txt

raw
1 include("${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/helpers/GdalCMakeMinimumRequired.cmake")
2 cmake_minimum_required(VERSION ${GDAL_CMAKE_VERSION_MIN}...${GDAL_CMAKE_VERSION_MAX})
3
4 if(NOT DEFINED PROJECT_SOURCE_DIR)
5 # Standalone plugin building
6 project(ogr_Arrow)
7 # The driver depends on some non exported headers. Make sure the version we
8 # build against against is the same as this source tree.
9 set(STRICT_VERSION_CHECK ON)
10 include("${PROJECT_SOURCE_DIR}/../../../cmake/helpers/SetupStandalonePlugin.cmake" )
11 include(CheckDependentLibrariesArrowParquet)
12 standalone_driver_finalize(OGR_ENABLE_DRIVER_ARROW)
13 endif()
14
15 add_gdal_driver(TARGET ogr_Arrow
16 SOURCES ogrfeatherdriver.cpp
17 ogrfeatherdataset.cpp
18 ogrfeatherlayer.cpp
19 ogrfeatherwriterdataset.cpp
20 ogrfeatherwriterlayer.cpp
21 CORE_SOURCES
22 ogrfeatherdrivercore.cpp
23 PLUGIN_CAPABLE
24 SKIP_GDAL_PRIV_HEADER # because we may need to use C++20
25 NO_SHARED_SYMBOL_WITH_CORE)
26
27 if(NOT TARGET ogr_Arrow)
28 return()
29 endif()
30
31 gdal_standard_includes(ogr_Arrow)
32 if (STANDALONE)
33 target_include_directories(ogr_Arrow PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../port
34 ${CMAKE_CURRENT_SOURCE_DIR}/../generic
35 ${CMAKE_CURRENT_SOURCE_DIR}/../..
36 )
37 else()
38 target_include_directories(ogr_Arrow PRIVATE $<TARGET_PROPERTY:ogrsf_generic,SOURCE_DIR>)
39 endif()
40
41 if(${Arrow_VERSION} VERSION_GREATER_EQUAL 16.0)
42 target_sources(ogr_Arrow PRIVATE vsifilesystemregistrar.cpp)
43 endif()
44
45 if(${Arrow_VERSION} VERSION_GREATER_EQUAL 10.0)
46 if(ARROW_USE_STATIC_LIBRARIES)
47 gdal_target_link_libraries(ogr_Arrow PRIVATE Arrow::arrow_static)
48 else()
49 gdal_target_link_libraries(ogr_Arrow PRIVATE Arrow::arrow_shared)
50 endif()
51 else()
52 if(ARROW_USE_STATIC_LIBRARIES)
53 gdal_target_link_libraries(ogr_Arrow PRIVATE arrow_static)
54 else()
55 gdal_target_link_libraries(ogr_Arrow PRIVATE arrow_shared)
56 endif()
57 endif()