diff options
author | Joerg Hofrichter <joerg.hofrichter@ni.com> | 2020-07-16 16:03:19 +0200 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-08-04 07:38:40 -0500 |
commit | 2bc89c8f1da93fd1c513a6b940ab4f405cfe0042 (patch) | |
tree | d061cd401703a7b8d3a6ad5c76ee25bb8a7e765a | |
parent | 294e60eb60034fa24e1ca62e59cf032a1b7bd57a (diff) | |
download | uhd-2bc89c8f1da93fd1c513a6b940ab4f405cfe0042.tar.gz uhd-2bc89c8f1da93fd1c513a6b940ab4f405cfe0042.tar.bz2 uhd-2bc89c8f1da93fd1c513a6b940ab4f405cfe0042.zip |
mpm: cmake: use UHDPython module to find Python
Use UHDPython module (from UHD) to find Python interpreter,
libraries and include directories.
-rw-r--r-- | mpm/CMakeLists.txt | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/mpm/CMakeLists.txt b/mpm/CMakeLists.txt index c41b3fce1..a30d3acd9 100644 --- a/mpm/CMakeLists.txt +++ b/mpm/CMakeLists.txt @@ -19,23 +19,18 @@ endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules) set(UHD_HOST_ROOT ${CMAKE_SOURCE_DIR}/../host) +list(INSERT CMAKE_MODULE_PATH 0 ${UHD_HOST_ROOT}/cmake/Modules) ######################################################################## # Setup Python API ######################################################################## + # We don't need to support older versions of Python, since we will always # deploy this on devices where we control the Python version. # MPM might work with future versions of Python, but we make no guarantees. -set(MPM_PYTHON_VERSION 3.5) - -# This variable is a helper for the find_package() commands below, and only -# takes effect if the build is happening on a system where the FindPython*.cmake -# files are older than ${MPM_PYTHON_VERSION}, which is usually not the case. -set(PYTHON_ADDITIONAL_VERSIONS ${MPM_PYTHON_VERSION}) -find_package(PythonInterp ${MPM_PYTHON_VERSION} REQUIRED) -find_package(PythonLibs ${MPM_PYTHON_VERSION} REQUIRED) -# Now, we can also include CMake modules from UHD: -list(INSERT CMAKE_MODULE_PATH 0 ${UHD_HOST_ROOT}/cmake/Modules) +set(PYTHON_MIN_VERSION 3.5) +# search the Python interpreter, modules and include directories +include(UHDPython) ######################################################################## # Version Information |