python: Fixes for building python modules

Moved src include AFTER setter for PYTHONBUILD_VERSION.  In this way,
the src CMakeLists has a valid PYTHONBUILD_VERSION str.
Call find_package on PythonInterp prior to finding the libs (recommended).

Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
Noel Eck
2016-06-24 17:11:28 -07:00
parent 9a74a3b4f5
commit 19b0b0c2f1
2 changed files with 4 additions and 3 deletions

View File

@ -231,8 +231,6 @@ if (RPM)
include(CPack)
endif()
add_subdirectory (src)
if(BUILDEXAMPLES)
add_subdirectory (examples/c++)
endif()
@ -249,6 +247,8 @@ if (BUILDSWIGPYTHON OR BUILDTESTS)
endif ()
endif ()
add_subdirectory (src)
if (BUILDTESTS)
find_package (PythonInterp ${PYTHONBUILD_VERSION} REQUIRED)
enable_testing ()