Skip to content

Commit

Permalink
FindPython[Interp|Libs] modules removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott M Anderson committed Feb 8, 2024
1 parent 4d4e2fd commit ab35137
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 22 deletions.
25 changes: 12 additions & 13 deletions projects/boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -155,26 +155,25 @@ function(userConfigJam jamFile)
"using bzip2 : ${bzip2Ver} : <search>${STAGE_DIR}/lib <name>${bzip2Name} <include>${bzip2Inc} ;\n"
)
# Boost.Python build
find_package(PythonInterp)
find_package(PythonLibs)
if(PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND)
find_package(Python "3.6...<3.10" COMPONENTS Interpreter Development)
if(Python_Interpreter_FOUND AND Python_Development_FOUND)
if(XP_BUILD_VERBOSE)
message(STATUS "PYTHON_EXECUTABLE: ${PYTHON_EXECUTABLE}")
message(STATUS "PYTHON_VERSION_STRING: ${PYTHON_VERSION_STRING}")
message(STATUS "PYTHON_INCLUDE_DIRS: ${PYTHON_INCLUDE_DIRS}")
message(STATUS "PYTHON_LIBRARIES: ${PYTHON_LIBRARIES}")
message(STATUS "Python_EXECUTABLE: ${Python_EXECUTABLE}")
message(STATUS "Python_VERSION: ${Python_VERSION}")
message(STATUS "Python_INCLUDE_DIRS: ${Python_INCLUDE_DIRS}")
message(STATUS "Python_LIBRARIES: ${Python_LIBRARIES}")
endif()
get_filename_component(PYTHON_LIB_DIR ${PYTHON_LIBRARIES} DIRECTORY)
get_filename_component(Python_LIB_DIR ${Python_LIBRARIES} DIRECTORY)
file(APPEND ${cfgFile}
"using python\n"
" : ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}\n"
" : \"${PYTHON_EXECUTABLE}\"\n"
" : \"${PYTHON_INCLUDE_DIRS}\"\n"
" : \"${PYTHON_LIB_DIR}\"\n"
" : ${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}\n"
" : \"${Python_EXECUTABLE}\"\n"
" : \"${Python_INCLUDE_DIRS}\"\n"
" : \"${Python_LIB_DIR}\"\n"
" : <python-debugging>off ;"
)
else()
message(FATAL_ERROR "Unable to build boost.python, required python not found")
message(FATAL_ERROR "Unable to build boost.python, required Python not found")
endif()
set(${jamFile} "${cfgFile}" PARENT_SCOPE)
endfunction()
Expand Down
6 changes: 3 additions & 3 deletions projects/llvm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ function(build_llvm)
if(NOT (XP_DEFAULT OR XP_PRO_LLVM))
return()
endif()
find_package(PythonInterp)
if(NOT PYTHONINTERP_FOUND)
message(FATAL_ERROR "Unable to build llvm/clang tools, required python not found")
find_package(Python)
if(NOT Python_FOUND)
message(FATAL_ERROR "Unable to build llvm/clang tools, required Python not found")
return()
endif()
set(XP_DEPS llvm llvm_clang)
Expand Down
6 changes: 3 additions & 3 deletions projects/nodejs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ function(build_nodejs)
if(NOT (XP_DEFAULT OR XP_PRO_NODEJS))
return()
endif()
find_package(PythonInterp)
if(NOT PYTHONINTERP_FOUND)
message(FATAL_ERROR "Unable to build nodejs, required python not found")
find_package(Python)
if(NOT Python_FOUND)
message(FATAL_ERROR "Unable to build nodejs, required Python not found")
return()
endif()
if(WIN32)
Expand Down
6 changes: 3 additions & 3 deletions projects/yasm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ function(build_yasm)
if(NOT (XP_DEFAULT OR XP_PRO_YASM))
return()
endif()
find_package(PythonInterp)
if(NOT PYTHONINTERP_FOUND)
message(FATAL_ERROR "Unable to build yasm, required python not found")
find_package(Python)
if(NOT Python_FOUND)
message(FATAL_ERROR "Unable to build yasm, required Python not found")
return()
endif()
xpGetArgValue(${PRO_YASM} ARG NAME VALUE NAME)
Expand Down

0 comments on commit ab35137

Please sign in to comment.