From b1c8a599cad48fdf18739467b3718eb6eba006c0 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Tue, 21 Jul 2020 18:04:16 -0700 Subject: [PATCH] Add cmake scripts for autoRIFT --- CMakeLists.txt | 2 ++ contrib/geo_autoRIFT/CMakeLists.txt | 12 ++++++++++++ contrib/geo_autoRIFT/autoRIFT/CMakeLists.txt | 18 ++++++++++++++++++ contrib/geo_autoRIFT/geogrid/CMakeLists.txt | 18 ++++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 contrib/geo_autoRIFT/CMakeLists.txt create mode 100644 contrib/geo_autoRIFT/autoRIFT/CMakeLists.txt create mode 100644 contrib/geo_autoRIFT/geogrid/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index c526ec4..7529e8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,8 @@ find_package(Python 3.5 REQUIRED COMPONENTS Interpreter Development find_package(FFTW REQUIRED) find_package(Motif) find_package(OpenMP REQUIRED COMPONENTS C CXX Fortran) +find_package(OpenCV COMPONENTS core highgui imgproc) + # Find these, and create IMPORTED INTERFACE libraries for them if they exist include(TargetGDAL) include(TargetMotif) diff --git a/contrib/geo_autoRIFT/CMakeLists.txt b/contrib/geo_autoRIFT/CMakeLists.txt new file mode 100644 index 0000000..45b35cf --- /dev/null +++ b/contrib/geo_autoRIFT/CMakeLists.txt @@ -0,0 +1,12 @@ +# Early exit if prereqs not found +if(NOT TARGET Python::NumPy +OR NOT TARGET GDAL::GDAL +OR NOT OpenCV_FOUND + ) + return() +endif() + +InstallSameDir(__init__.py) + +add_subdirectory(autoRIFT) +add_subdirectory(geogrid) diff --git a/contrib/geo_autoRIFT/autoRIFT/CMakeLists.txt b/contrib/geo_autoRIFT/autoRIFT/CMakeLists.txt new file mode 100644 index 0000000..55ec5a0 --- /dev/null +++ b/contrib/geo_autoRIFT/autoRIFT/CMakeLists.txt @@ -0,0 +1,18 @@ +Python_add_library(autoriftcore MODULE + bindings/autoriftcoremodule.cpp + ) +target_include_directories(autoriftcore PRIVATE + include + ${OpenCV_INCLUDE_DIRS} + ) +target_link_libraries(autoriftcore PRIVATE + Python::NumPy + ${OpenCV_LIBS} + ) + +InstallSameDir( + autoriftcore + __init__.py + autoRIFT_ISCE.py + autoRIFT.py + ) diff --git a/contrib/geo_autoRIFT/geogrid/CMakeLists.txt b/contrib/geo_autoRIFT/geogrid/CMakeLists.txt new file mode 100644 index 0000000..d155e28 --- /dev/null +++ b/contrib/geo_autoRIFT/geogrid/CMakeLists.txt @@ -0,0 +1,18 @@ +Python_add_library(geogrid MODULE + bindings/geogridmodule.cpp + src/geogrid.cpp + ) +target_include_directories(geogrid PRIVATE + include + ) +target_link_libraries(geogrid PRIVATE + GDAL::GDAL + combinedLib + ) + +InstallSameDir( + geogrid + __init__.py + Geogrid.py + GeogridOptical.py + )