glpy/make.py
2024-06-28 16:58:11 +08:00

17 lines
547 B
Python

from pymake import *
(
cmake("3.15")
.set(cmake_export_compile_commands, on)
.project("test_pybind11")
.file("SRC",glob_recurse,"src/*.cpp")
.just_add("""find_package(Python 3.12.3 COMPONENTS Interpreter Development REQUIRED)""")
.just_add("find_package(pybind11 CONFIG REQUIRED)")
.add_subdirectory("glfw")
.target_link_libraries(var(project_name),"glfw")
.find_package("OpenGl")
.target_link_libraries(var(project_name),"OpenGL::GL")
.pybind11_add_module(var(project_name),var("SRC"))
.write()
)