mirror of
https://github.com/drewcassidy/quicktex.git
synced 2024-09-13 06:37:34 +00:00
Slightly modernize how project is compiled
This commit is contained in:
parent
421876ab0f
commit
654b6d628a
@ -6,8 +6,8 @@ project(quicktex)
|
|||||||
|
|
||||||
# Find dependencies
|
# Find dependencies
|
||||||
find_package(Python COMPONENTS Interpreter Development)
|
find_package(Python COMPONENTS Interpreter Development)
|
||||||
|
find_package(pybind11 CONFIG REQUIRED)
|
||||||
find_package(OpenMP)
|
find_package(OpenMP)
|
||||||
add_subdirectory(extern/pybind11)
|
|
||||||
|
|
||||||
# Collect source files
|
# Collect source files
|
||||||
file(GLOB SOURCE_FILES
|
file(GLOB SOURCE_FILES
|
||||||
|
@ -1 +0,0 @@
|
|||||||
graft extern
|
|
1
extern/pybind11
vendored
1
extern/pybind11
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 8de7772cc72daca8e947b79b83fea46214931604
|
|
@ -3,8 +3,9 @@ requires = [
|
|||||||
"setuptools>=61",
|
"setuptools>=61",
|
||||||
"setuptools_scm>=6.2",
|
"setuptools_scm>=6.2",
|
||||||
"wheel",
|
"wheel",
|
||||||
|
"cmake>=3.17",
|
||||||
|
"pybind11~=2.6.1",
|
||||||
"ninja; sys_platform != 'win32'",
|
"ninja; sys_platform != 'win32'",
|
||||||
"cmake>=3.12",
|
|
||||||
]
|
]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
4
setup.py
4
setup.py
@ -2,6 +2,7 @@ import os
|
|||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import pybind11
|
||||||
|
|
||||||
from setuptools import setup, Extension
|
from setuptools import setup, Extension
|
||||||
from setuptools.command.build_ext import build_ext
|
from setuptools.command.build_ext import build_ext
|
||||||
@ -38,9 +39,12 @@ class CMakeBuild(build_ext):
|
|||||||
# Set Python_EXECUTABLE instead if you use PYBIND11_FINDPYTHON
|
# Set Python_EXECUTABLE instead if you use PYBIND11_FINDPYTHON
|
||||||
cmake_args = [
|
cmake_args = [
|
||||||
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={}".format(extdir),
|
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={}".format(extdir),
|
||||||
|
"-Dpybind11_DIR={}".format(pybind11.get_cmake_dir()),
|
||||||
"-DPython_EXECUTABLE={}".format(sys.executable),
|
"-DPython_EXECUTABLE={}".format(sys.executable),
|
||||||
"-DQUICKTEX_VERSION_INFO={}".format(version),
|
"-DQUICKTEX_VERSION_INFO={}".format(version),
|
||||||
"-DCMAKE_BUILD_TYPE={}".format(cfg), # not used on MSVC, but no harm
|
"-DCMAKE_BUILD_TYPE={}".format(cfg), # not used on MSVC, but no harm
|
||||||
|
# clear cached make program binary, see https://github.com/pypa/setuptools/issues/2912
|
||||||
|
"-U", "CMAKE_MAKE_PROGRAM",
|
||||||
]
|
]
|
||||||
build_args = []
|
build_args = []
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user