-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
35 lines (24 loc) · 1.24 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
set(CMAKE_VERBOSE_MAKEFILE ON)
cmake_minimum_required(VERSION 3.16)
project(gribtoarrow)
set (CMAKE_CXX_STANDARD 17)
find_package(Arrow REQUIRED)
message(STATUS "Arrow version: ${ARROW_VERSION}")
message(STATUS "Arrow SO version: ${ARROW_FULL_SO_VERSION}")
message(STATUS "Arrow Libraries: ${ARROW_LIB_DIR}")
message(STATUS "Arrow Include dir: ${ARROW_INCLUDE_DIR}")
add_subdirectory(pybind11)
INCLUDE_DIRECTORIES(/usr/local/include;
/opt/homebrew/Cellar/[email protected]/3.12.1/Frameworks/Python.framework/Versions/3.12/Headers;
/Users/hugo/Development/python/venv/lib/python3.12/site-packages/pyarrow/include)
LINK_DIRECTORIES(/usr/local/lib;/Users/hugo/.pyenv/versions/3.12.0/lib
/Users/hugo/Development/python/venv/lib/python3.12/site-packages/pyarrow/lib
/Users/hugo/Development/python/venv/lib/python3.12/site-packages/pyarrow/
/opt/homebrew/Cellar/apache-arrow/14.0.1_2/lib)
file(GLOB_RECURSE sources src/*.cpp pythonApi/*.cpp)
message(STATUS "Sources: ${sources}")
#Note the order is important here
#pybind11_add_moudle should be before target_link_libraries
pybind11_add_module(gribtoarrow ${sources})
#This must be after pybind11_add_module
target_link_libraries(gribtoarrow PRIVATE Arrow::arrow_shared arrow_python eccodes PRIVATE python3.12 )