Skip to content

Commit

Permalink
look for python in the form python38
Browse files Browse the repository at this point in the history
Signed-off-by: brian gloyer <[email protected]>
  • Loading branch information
bgloyer committed Aug 2, 2020
1 parent 72ea66d commit 04e8d22
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
cmake_minimum_required(VERSION 2.8.3)

project(
"boost-python-example"
LANGUAGES CXX
)

FIND_PACKAGE(PythonInterp)

if (PYTHONINTERP_FOUND)
if (UNIX AND NOT APPLE)
if (PYTHON_VERSION_MAJOR EQUAL 3)
FIND_PACKAGE(Boost COMPONENTS python${PYTHON_VERSION_SUFFIX})
if (NOT Boost_FOUND)
# look for python in the form of python38
FIND_PACKAGE(Boost COMPONENTS python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} REQUIRED)
endif()
FIND_PACKAGE(PythonInterp 3)
FIND_PACKAGE(PythonLibs 3 REQUIRED)
else()
Expand Down

0 comments on commit 04e8d22

Please sign in to comment.