Skip to content

Commit

Permalink
cache PDAL_PYTHON_VERSION_STRING to inform pdal-config and friends
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Apr 2, 2018
1 parent 7e11c59 commit 7207774
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/pdal-config-bat.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ IF "%1" == "--includes" echo @PDAL_INCLUDE_DEFINITIONS@ & goto exit
IF "%1" == "--cflags" echo @CMAKE_C_FLAGS@ & goto exit
IF "%1" == "--cxxflags" echo @CMAKE_CXX_FLAGS@ -std=c++11 & goto exit
IF "%1" == "--version" echo @PDAL_VERSION_STRING@ & goto exit
IF "%1" == "--python-version" echo @PYTHON_VERSION_STRING@ & goto exit
IF "%1" == "--python-version" echo @PDAL_PYTHON_VERSION_STRING@ & goto exit


echo Usage: pdal-config [OPTIONS]
Expand Down
2 changes: 1 addition & 1 deletion apps/pdal-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ case $1 in
;;

--python-version)
echo @PYTHON_VERSION_STRING@
echo @PDAL_PYTHON_VERSION_STRING@
;;

*)
Expand Down
4 changes: 2 additions & 2 deletions cmake/examples/hobu-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ CC=$CC CXX=$CXX cmake -G "$CONFIG" \
-DSQLITE3_INCLUDE_DIR=${SQLITE_HOME}/include \
-DSQLITE3_LIBRARY=${SQLITE_HOME}/lib/libsqlite3.${SO_EXT} \
-DPYTHON_EXECUTABLE=/usr/local/bin/python2 \
-DPYTHON_LIBRARY=/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
-DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/include/python2.7/ \
-DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6.dylib \
-DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/include/python3.6m/ \
-DOCI_CONNECTION="lidar/lidar@localhost:1521/xe.oracle.docker" \
-DPGPOINTCLOUD_TEST_DB_HOST="localhost"
# -DBUILD_PLUGIN_MATLAB=ON \
Expand Down
2 changes: 1 addition & 1 deletion cmake/python.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if(PYTHONLIBS_FOUND)
set(PDAL_HAVE_PYTHON 1)
add_definitions(-DPDAL_PYTHON_LIBRARY="${PYTHON_LIBRARY}")
set(PDAL_HAVE_PYTHON 1)
set(PYTHON_VERSION_STRING "${PYTHONLIBS_VERSION_STRING}" )
set(PDAL_PYTHON_VERSION_STRING "${PYTHONLIBS_VERSION_STRING}" CACHE STRING "PDAL Python version" FORCE)

find_package(NumPy QUIET 1.5 REQUIRED)
include_directories(SYSTEM ${NUMPY_INCLUDE_DIR})
Expand Down

0 comments on commit 7207774

Please sign in to comment.