Slightly modernize how project is compiled

pull/14/head
Andrew Cassidy 2 years ago
parent 421876ab0f
commit 654b6d628a

@ -6,8 +6,8 @@ project(quicktex)
# Find dependencies
find_package(Python COMPONENTS Interpreter Development)
find_package(pybind11 CONFIG REQUIRED)
find_package(OpenMP)
add_subdirectory(extern/pybind11)
# Collect source files
file(GLOB SOURCE_FILES

@ -1 +0,0 @@
graft extern

1
extern/pybind11 vendored

@ -1 +0,0 @@
Subproject commit 8de7772cc72daca8e947b79b83fea46214931604

@ -3,8 +3,9 @@ requires = [
"setuptools>=61",
"setuptools_scm>=6.2",
"wheel",
"cmake>=3.17",
"pybind11~=2.6.1",
"ninja; sys_platform != 'win32'",
"cmake>=3.12",
]
build-backend = "setuptools.build_meta"

@ -2,6 +2,7 @@ import os
import re
import sys
import subprocess
import pybind11
from setuptools import setup, Extension
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
cmake_args = [
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={}".format(extdir),
"-Dpybind11_DIR={}".format(pybind11.get_cmake_dir()),
"-DPython_EXECUTABLE={}".format(sys.executable),
"-DQUICKTEX_VERSION_INFO={}".format(version),
"-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 = []

Loading…
Cancel
Save