CMake: reorder Python detection
authorYegor Yefremov <yegorslists@googlemail.com>
Mon, 13 Jan 2020 14:08:44 +0000 (15:08 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 15 Jan 2020 19:41:00 +0000 (20:41 +0100)
PythonInterp should be detected before PythonLibs otherwise
CMake exits with the following message:

Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

python/CMakeLists.txt

index fc1c3d1..5b6f420 100644 (file)
@@ -14,8 +14,8 @@ else ()
     set ( SWIG_FOUND TRUE )
   endif ()
 endif ()
-find_package ( PythonLibs REQUIRED )
 find_package ( PythonInterp REQUIRED )
+find_package ( PythonLibs REQUIRED )
 
 include ( UseSWIG )
 include_directories ( BEFORE ${CMAKE_SOURCE_DIR}/src )