From 18da15a0872477cf2bc65b55a4965c867c7b55a4 Mon Sep 17 00:00:00 2001 From: Kevin Kofler <kevin.kofler@chello.at> Date: Sat, 14 Feb 2015 22:45:10 +0100 Subject: [PATCH] Fix build without Python support. Only search for BoostPython3 if Python was found. Otherwise, ${PYTHONLIBS_VERSION_STRING} expands to nothing and the find_boost_python3 macro gets called with invalid arguments. --- CMakeLists.txt | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 20bb48de3c..3ce128c725 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,16 +45,18 @@ macro_log_feature( "Python 3 is used for some Calamares job modules." ) -include( BoostPython3 ) -find_boost_python3( 1.54.0 ${PYTHONLIBS_VERSION_STRING} CALAMARES_BOOST_PYTHON3_FOUND ) -macro_log_feature( - CALAMARES_BOOST_PYTHON3_FOUND - "Boost.Python" - "A C++ library which enables seamless interoperability between C++ and Python 3." - "http://www.boost.org" - FALSE "1.54.0" - "Boost.Python is used for interfacing with Calamares job modules written in Python 3." -) +if ( PYTHONLIBS_FOUND ) + include( BoostPython3 ) + find_boost_python3( 1.54.0 ${PYTHONLIBS_VERSION_STRING} CALAMARES_BOOST_PYTHON3_FOUND ) + macro_log_feature( + CALAMARES_BOOST_PYTHON3_FOUND + "Boost.Python" + "A C++ library which enables seamless interoperability between C++ and Python 3." + "http://www.boost.org" + FALSE "1.54.0" + "Boost.Python is used for interfacing with Calamares job modules written in Python 3." + ) +endif() if ( PYTHONLIBS_NOTFOUND OR NOT CALAMARES_BOOST_PYTHON3_FOUND ) set( WITH_PYTHON OFF ) -- GitLab