aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-06 11:27:02 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-06 11:27:02 +0200
commitd3f19cc27ea4634a64821688e9adec6046f4d7de (patch)
tree3ad0d02f3336218573662b8898414f1be8c98178
parent7cb42f4368e873e5930cf84bc2494a8e8172a046 (diff)
downloadnextpnr-d3f19cc27ea4634a64821688e9adec6046f4d7de.tar.gz
nextpnr-d3f19cc27ea4634a64821688e9adec6046f4d7de.tar.bz2
nextpnr-d3f19cc27ea4634a64821688e9adec6046f4d7de.zip
cmake: Fix Boost::Python finder on Gentoo
Signed-off-by: David Shah <davey1576@gmail.com>
-rw-r--r--CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index db866b5f..7b50e1d8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,8 +52,22 @@ endwhile ()
if (NOT Boost_PYTHON_FOUND)
find_package(Boost COMPONENTS python3 ${boost_libs})
+ if ("${Boost_LIBRARIES}" MATCHES ".*(python|PYTHON).*" )
+ set(Boost_PYTHON_FOUND TRUE)
+ endif ()
+endif ()
+
+if (NOT Boost_PYTHON_FOUND)
+ STRING(REGEX REPLACE "([0-9]+\\.[0-9]+).*" "\\1" gentoo_version ${PYTHONLIBS_VERSION_STRING})
+ find_package(Boost COMPONENTS python-${gentoo_version} ${boost_libs})
+ if ("${Boost_LIBRARIES}" MATCHES ".*(python|PYTHON).*" )
+ set(Boost_PYTHON_FOUND TRUE)
+ endif ()
endif ()
+if (NOT Boost_PYTHON_FOUND )
+ message( FATAL_ERROR "No version of Boost::Python 3.x could be found.")
+endif ()
include(gui/gui.cmake)
include_directories(common/ gui/ ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS})