From 598fd32ee81d3c832c8785b645e759dd6fd20783 Mon Sep 17 00:00:00 2001 From: Grigory Pomadchin Date: Sun, 7 Jan 2024 19:49:52 -0500 Subject: [PATCH] Set PDAL_DIR --- .github/workflows/ci.yml | 18 +++++++++++++----- native/src/CMakeLists.txt | 4 ++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff18cca..bedeae3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,19 +58,27 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 with: - miniconda-version: "latest" - auto-activate-base: true + # auto-update-conda: true + # auto-activate-base: true activate-environment: "pdal-java" channels: conda-forge - name: Install PDAL run: conda install pdal=${{ matrix.pdal }} - - name: Check formatting - run: sbt scalafmtCheckAll + # - name: Check formatting + # run: sbt scalafmtCheckAll - name: Build project - run: sbt +test + run: | + # export PDAL_DIR=$CONDAenvs/pdal-java/ + echo "CONA: $CONDA" + ls $CONDA + echo "========" + ls ${PDAL_DIR}/envs + echo "=======" + which pdal + sbt +test - uses: actions/upload-artifact@v3 with: diff --git a/native/src/CMakeLists.txt b/native/src/CMakeLists.txt index 89ad247..c868237 100644 --- a/native/src/CMakeLists.txt +++ b/native/src/CMakeLists.txt @@ -32,6 +32,10 @@ if (JNI_FOUND) endif() if (NOT PDAL_BUILD) + if(DEFINED ENV{PDAL_DIR}) + set(PDAL_DIR "$ENV{PDAL_DIR}") + endif() + find_package(PDAL 2.0.0 REQUIRED CONFIG) endif()