Skip to content

Commit

Permalink
Redo of #2429 to link OpenSSL 1.1+ to PDAL (#2436)
Browse files Browse the repository at this point in the history
* OpenSSL support

* Deactivate openssl on windows

* Deactivate openssl on windows

* fix up my windows conda build setup

* try linking openssl on windows

* use different OPENSSL ROOT dir on appveyor config
  • Loading branch information
hobu committed Apr 4, 2019
1 parent 37a69f1 commit 3d5f8b2
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 29 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ include(${PDAL_CMAKE_DIR}/json.cmake)
include(${PDAL_CMAKE_DIR}/libxml2.cmake)
include(${PDAL_CMAKE_DIR}/dimension.cmake)
include(${PDAL_CMAKE_DIR}/arbiter.cmake)
include(${PDAL_CMAKE_DIR}/openssl.cmake) # Optional

#------------------------------------------------------------------------------
# generate the pdal_features.hpp header
Expand Down
7 changes: 7 additions & 0 deletions cmake/openssl.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
find_package(OpenSSL 1.1)
if (OPENSSL_FOUND)
set(ARBITER_OPENSSL TRUE)
else ()
message("OpenSSL NOT found - `export OPENSSL_ROOT_DIR=___`")
message("Google storage IO will not be available")
endif ()
1 change: 1 addition & 0 deletions scripts/appveyor/test/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ cmake -G "Ninja" ^
-DCMAKE_VERBOSE_MAKEFILE=%CMAKE_VERBOSE_MAKEFILE% ^
-DCMAKE_LIBRARY_PATH:FILEPATH="%CONDA_ROOT%/Library/lib" ^
-DCMAKE_INCLUDE_PATH:FILEPATH="%CONDA_ROOT%/Library/include" ^
-DOPENSSL_ROOT_DIR=%CONDA_ROOT%/Library ^
-DPython3_ROOT_DIR:FILEPATH="%CONDA_PREFIX%" ^
-DBUILD_PLUGIN_CPD=OFF ^
-DBUILD_PLUGIN_GREYHOUND=ON ^
Expand Down
46 changes: 46 additions & 0 deletions scripts/conda/win64-setup.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
set CONDA_ENVIRO=pdal-build

call conda config --set always_yes yes
IF ERRORLEVEL 1 GOTO CLEANUP

call conda remove --name %CONDA_ENVIRO% -y --all
IF ERRORLEVEL 1 GOTO CLEANUP

call conda create --name %CONDA_ENVIRO% -y
IF ERRORLEVEL 1 GOTO CLEANUP

call conda activate %CONDA_ENVIRO%
IF ERRORLEVEL 1 GOTO CLEANUP

call conda config --add channels conda-forge
IF ERRORLEVEL 1 GOTO CLEANUP

call conda install geotiff ^
laszip ^
nitro ^
curl ^
gdal ^
pcl ^
cmake ^
eigen ^
ninja ^
zstd ^
numpy ^
xz ^
libxml2 ^
laz-perf ^
qhull ^
sqlite ^
hdf5 ^
tiledb

REM IF ERRORLEVEL 1 GOTO CLEANUP




:CLEANUP
call conda deactivate
popd
exit /b

30 changes: 1 addition & 29 deletions scripts/conda/win64.sh → scripts/conda/win64.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,6 @@ del /s /q %CONDA_ENVIRO%
mkdir %CONDA_ENVIRO%
pushd %CONDA_ENVIRO%

set GDAL_VERSION=2.2.4
set NUMPY_VERSION=1.15.3

call conda config --set always_yes yes
IF ERRORLEVEL 1 GOTO CLEANUP

call conda remove --name %CONDA_ENVIRO% -y --all
IF ERRORLEVEL 1 GOTO CLEANUP

call conda create --name %CONDA_ENVIRO% -y
IF ERRORLEVEL 1 GOTO CLEANUP

call %CONDA_PREFIX%\\Scripts\activate.bat %CONDA_ENVIRO%
IF ERRORLEVEL 1 GOTO CLEANUP

call conda config --add channels conda-forge
IF ERRORLEVEL 1 GOTO CLEANUP

call conda install geotiff laszip nitro curl gdal=%GDAL_VERSION% pcl cmake eigen ninja libgdal=%GDAL_VERSION% zstd numpy=%NUMPY_VERSION% xz libxml2 laz-perf qhull sqlite hdf5 oracle-instantclient numpy-base=%NUMPY_VERSION% tiledb

IF ERRORLEVEL 1 GOTO CLEANUP

REM set GENERATOR="Visual Studio 14 2015 Win64"
REM set GENERATOR="NMake Makefiles"
set GENERATOR="Ninja"
Expand All @@ -39,7 +17,7 @@ cmake -G %GENERATOR% ^
-DBUILD_PLUGIN_PCL=ON ^
-DBUILD_PLUGIN_PYTHON=ON ^
-DBUILD_PLUGIN_PGPOINTCLOUD=ON ^
-DBUILD_PLUGIN_OCI=ON ^
-DBUILD_PLUGIN_OCI=OFF ^
-DBUILD_PLUGIN_I3S=ON ^
-DBUILD_PLUGIN_SQLITE=ON ^
-DBUILD_PLUGIN_ICEBRIDGE=ON ^
Expand All @@ -56,10 +34,4 @@ cmake -G %GENERATOR% ^
.. --debug-trycompile

call ninja
IF ERRORLEVEL 1 GOTO CLEANUP

:CLEANUP
call conda deactivate
popd
exit /b

11 changes: 11 additions & 0 deletions vendor/arbiter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ if (ZLIB_FOUND)
PRIVATE
ARBITER_ZLIB)
endif()
if (OPENSSL_FOUND)
target_include_directories(${PDAL_ARBITER_LIB_NAME}
PRIVATE
${OPENSSL_INCLUDE_DIR})
target_link_libraries(${PDAL_ARBITER_LIB_NAME}
PRIVATE
${OPENSSL_LIBRARIES})
target_compile_definitions(${PDAL_ARBITER_LIB_NAME}
PRIVATE
ARBITER_OPENSSL)
endif()

set_target_properties(${PDAL_ARBITER_LIB_NAME} PROPERTIES
VERSION "${PDAL_BUILD_VERSION}"
Expand Down

0 comments on commit 3d5f8b2

Please sign in to comment.