Skip to content

Commit

Permalink
[Issue JdeRobot#485] Adds python search and as a dependency
Browse files Browse the repository at this point in the history
- Search python 2 executable as a new dependency.
- Search python module "lib" path and stores it in a variable.
  • Loading branch information
lr-morales committed Jun 18, 2016
1 parent 051361e commit 82b9bdf
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Deps/python2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
find_package(PythonInterp 2 REQUIRED)

execute_process(
COMMAND ${PYTHON_EXECUTABLE} -c "import os;print(os.path.dirname(os.__file__))"
RESULT_VARIABLE _RESULT
OUTPUT_VARIABLE PYTHON_MODULE_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
)

if(_RESULT)
message(FATAL_ERROR "Failed to determine python information")
endif(_RESULT)
unset(_RESULT)

message(${PYTHON_MODULE_PATH})

0 comments on commit 82b9bdf

Please sign in to comment.