From d31d964acccf1d0160b4f8f134979a0bf39277b2 Mon Sep 17 00:00:00 2001 From: Yucheng Liu Date: Sat, 16 Dec 2023 17:05:09 +0800 Subject: [PATCH] Added Intel+Nvidia PC supports --- .gitignore | 1 + CMakeLists.txt | 6 +++--- setup.py | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index bb2ce51..d49fb0c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ build +!build/Directory.Build.props apps/results apps/files apps/__pycache__ diff --git a/CMakeLists.txt b/CMakeLists.txt index 233e4be..7131a13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,9 +6,9 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") set(CMAKE_EXPORT_COMPILE_COMMANDS ON) if(WIN32) - find_package(Python 3.6 COMPONENTS Development REQUIRED) + find_package(Python 3.8 COMPONENTS Development EXACT REQUIRED) else() - find_package(Python 3.7 COMPONENTS Development REQUIRED) + find_package(Python 3.8 COMPONENTS Development EXACT REQUIRED) endif() add_subdirectory(pybind11) @@ -30,7 +30,7 @@ endif() # include_directories(${CMAKE_SOURCE_DIR}/pybind11/include) include_directories(${PYTHON_INCLUDE_PATH}) -find_package(PythonLibs REQUIRED) +find_package(PythonLibs 3.8 EXACT REQUIRED) include_directories(${PYTHON_INCLUDE_PATH}) include_directories(${PYTHON_INCLUDE_DIRS}) include_directories(pybind11/include) diff --git a/setup.py b/setup.py index c4473db..631218a 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,10 @@ def build_extension(self, ext): include_path = info['include'] cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir, '-DPYTHON_LIBRARY=' + os.path.join(get_config_var('LIBDEST'), '..', 'libs'), - '-DPYTHON_INCLUDE_PATH=' + include_path] + # '-DPYTHON_INCLUDE_PATH=' + include_path, + '-DPYTHON_INCLUDE_PATH=' + os.path.join(get_config_var('LIBDEST'), '..', 'include'), + '-DPYTHON_EXECUTABLE:FILEPATH=' + os.path.join(get_config_var('LIBDEST'), '..'), + '-DPYTHON_EXECUTABLE=' + os.path.join(get_config_var('LIBDEST'), '..', 'python.exe')] cfg = 'Debug' if self.debug else 'Release' build_args = ['--config', cfg]