Compare commits

..

No commits in common. "0c2fd4a6be9f19ab4a48f0bbcde0deb14c8f398a" and "364bc01c6bca965b5faac3a7fcba254a79191c53" have entirely different histories.

5 changed files with 18 additions and 7 deletions

3
.gitmodules vendored
View File

@ -7,6 +7,3 @@
[submodule "glew"]
path = glew
url = https://git.zziyu.cn/Zengtudor/glew.git
[submodule "glew-cmake"]
path = glew-cmake
url = https://git.zziyu.cn/Zengtudor/glew-cmake.git

View File

@ -7,7 +7,7 @@ find_package(pybind11 CONFIG REQUIRED)
pybind11_add_module(${PROJECT_NAME} ${SRC})
add_subdirectory( ${PROJECT_SOURCE_DIR}/glew-cmake )
add_subdirectory( ${PROJECT_SOURCE_DIR}/glew/build/cmake )
add_subdirectory( ${PROJECT_SOURCE_DIR}/glfw )
target_link_libraries(${PROJECT_NAME} PRIVATE glfw)
find_package(OpenGl REQUIRED)

@ -1 +0,0 @@
Subproject commit a5494db414d62e7bcb19f9f8fd7ee660338ea08e

17
make.py Normal file
View File

@ -0,0 +1,17 @@
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()
)

View File

@ -10,8 +10,6 @@ int tests::glfw_window(unsigned width,unsigned height, std::string title)
if (!glfwInit())
return -1;
/* Create a windowed mode window and its OpenGL context */
window = glfwCreateWindow(width, height, title.c_str(), NULL, NULL);
if (!window)