Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:PDAL/PDAL
- Loading branch information
Showing
3 changed files
with
45 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# - Try to find the Python module NumPy | ||
# | ||
# This module defines: | ||
# NUMPY_INCLUDE_DIR: include path for arrayobject.h | ||
|
||
# Copyright (c) 2009-2012 Arnaud Barré <arnaud.barre@gmail.com> | ||
# Redistribution and use is allowed according to the terms of the BSD license. | ||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. | ||
|
||
MESSAGE(STATUS "Searching for NumPy library") | ||
|
||
IF (NUMPY_INCLUDE_DIR) | ||
SET(NUMPY_FIND_QUIETLY TRUE) | ||
endif (NUMPY_INCLUDE_DIR) | ||
|
||
# To set the variables PYTHON_EXECUTABLE | ||
FIND_PACKAGE(PythonInterp REQUIRED) | ||
|
||
# Look for the include path | ||
# WARNING: The variable PYTHON_EXECUTABLE is defined by the script FindPythonInterp.cmake | ||
EXECUTE_PROCESS(COMMAND "${PYTHON_EXECUTABLE}" -c "import numpy; print numpy.get_include(); print numpy.version.version" | ||
OUTPUT_VARIABLE NUMPY_OUTPUT | ||
ERROR_VARIABLE NUMPY_ERROR) | ||
|
||
IF(NOT NUMPY_ERROR) | ||
STRING(REPLACE "\n" ";" NUMPY_OUTPUT ${NUMPY_OUTPUT}) | ||
LIST(GET NUMPY_OUTPUT 0 NUMPY_INCLUDE_DIR) | ||
LIST(GET NUMPY_OUTPUT 1 NUMPY_VERSION) | ||
ENDIF(NOT NUMPY_ERROR) | ||
|
||
INCLUDE(FindPackageHandleStandardArgs) | ||
|
||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NumPy DEFAULT_MSG NUMPY_VERSION NUMPY_INCLUDE_DIR) | ||
|
||
MESSAGE(STATUS "Found NumPy at ${NUMPY_INCLUDE_DIR}") | ||
MARK_AS_ADVANCED(NUMPY_INCLUDE_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters