Compare commits
2 Commits
364bc01c6b
...
0c2fd4a6be
Author | SHA1 | Date | |
---|---|---|---|
0c2fd4a6be | |||
36f2c3e50a |
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -7,3 +7,6 @@
|
|||||||
[submodule "glew"]
|
[submodule "glew"]
|
||||||
path = glew
|
path = glew
|
||||||
url = https://git.zziyu.cn/Zengtudor/glew.git
|
url = https://git.zziyu.cn/Zengtudor/glew.git
|
||||||
|
[submodule "glew-cmake"]
|
||||||
|
path = glew-cmake
|
||||||
|
url = https://git.zziyu.cn/Zengtudor/glew-cmake.git
|
||||||
|
@ -7,7 +7,7 @@ find_package(pybind11 CONFIG REQUIRED)
|
|||||||
|
|
||||||
pybind11_add_module(${PROJECT_NAME} ${SRC})
|
pybind11_add_module(${PROJECT_NAME} ${SRC})
|
||||||
|
|
||||||
add_subdirectory( ${PROJECT_SOURCE_DIR}/glew/build/cmake )
|
add_subdirectory( ${PROJECT_SOURCE_DIR}/glew-cmake )
|
||||||
add_subdirectory( ${PROJECT_SOURCE_DIR}/glfw )
|
add_subdirectory( ${PROJECT_SOURCE_DIR}/glfw )
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE glfw)
|
target_link_libraries(${PROJECT_NAME} PRIVATE glfw)
|
||||||
find_package(OpenGl REQUIRED)
|
find_package(OpenGl REQUIRED)
|
||||||
|
1
glew-cmake
Submodule
1
glew-cmake
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit a5494db414d62e7bcb19f9f8fd7ee660338ea08e
|
17
make.py
17
make.py
@ -1,17 +0,0 @@
|
|||||||
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()
|
|
||||||
)
|
|
@ -10,6 +10,8 @@ int tests::glfw_window(unsigned width,unsigned height, std::string title)
|
|||||||
if (!glfwInit())
|
if (!glfwInit())
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Create a windowed mode window and its OpenGL context */
|
/* Create a windowed mode window and its OpenGL context */
|
||||||
window = glfwCreateWindow(width, height, title.c_str(), NULL, NULL);
|
window = glfwCreateWindow(width, height, title.c_str(), NULL, NULL);
|
||||||
if (!window)
|
if (!window)
|
||||||
|
Loading…
Reference in New Issue
Block a user