We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMakeLists.txtでPythonのバージョンと利用するPythonバージョンが一致しないとSIGSEGVで落ちますので、以下のように対応できます。
cmake_minimum_required(VERSION 3.12) project(hakoniwa_python_project LANGUAGES C CXX ) # PythonのバージョンがCMakeで指定されているかどうかを確認 if(${CMAKE_VERSION} LESS 3.12) find_package(PythonLibs REQUIRED) include_directories(${PYTHON_INCLUDE_DIRS}) set(HAKO_PYTHON_LIBS ${PYTHON_LIBRARIES}) else() set(Python3_EXECUTABLE "$ENV{HOME}/.pyenv/versions/3.10.0/bin/python3.10") set(Python3_INCLUDE_DIRS "$ENV{HOME}/.pyenv/versions/3.10.0/include/python3.10") set(Python3_LIBRARIES "$ENV{HOME}/.pyenv/versions/3.10.0/lib/libpython3.10.dylib") find_package(Python3 3.10 EXACT REQUIRED) include_directories(${Python3_INCLUDE_DIRS}) set(HAKO_PYTHON_LIBS ${Python3_LIBRARIES}) # Debugging messages message(STATUS "Python3_VERSION: ${Python3_VERSION}") message(STATUS "Python3_INCLUDE_DIRS: ${Python3_INCLUDE_DIRS}") endif() message(STATUS "CMAKE_VERSION: ${CMAKE_VERSION}") message(STATUS "PYTHON_INCLUDE_DIRS: ${PYTHON_INCLUDE_DIRS}") message(STATUS "Python_INCLUDE_DIRS: ${Python_INCLUDE_DIRS}") message(STATUS "PYTHON_LIBRARIES: ${PYTHON_LIBRARIES}") message(STATUS "Python_LIBRARIES: ${Python_LIBRARIES}") message(STATUS "Python_LIBRARY_DIRS: ${Python_LIBRARY_DIRS}") add_library( hako_asset_python SHARED hako_asset_python.cpp ) target_link_libraries( hako_asset_python assets ${HAKO_PYTHON_LIBS} )
The text was updated successfully, but these errors were encountered:
condaは実績ありません。
SIGSEGVで落ちます。
Sorry, something went wrong.
Windowsはpyenvがないと思われるので、面倒ですね。
CMAKE_VERSIONは、3.12以降にしたい。
No branches or pull requests
対応方法
CMakeLists.txtでPythonのバージョンと利用するPythonバージョンが一致しないとSIGSEGVで落ちますので、以下のように対応できます。
The text was updated successfully, but these errors were encountered: