From f8048761001050d188fa24a6c6b4b75716a3e59e Mon Sep 17 00:00:00 2001 From: ZtRXR Date: Fri, 28 Jun 2024 22:58:16 +0800 Subject: [PATCH] update --- CMakeLists.txt | 15 ++++++++++++--- glew-cmake | 1 - src/main.cpp | 1 + src/test_window.cpp | 1 + 4 files changed, 14 insertions(+), 4 deletions(-) delete mode 160000 glew-cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index d148686..84f0c7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,9 +7,18 @@ find_package(pybind11 CONFIG REQUIRED) pybind11_add_module(${PROJECT_NAME} ${SRC}) -add_subdirectory( ${PROJECT_SOURCE_DIR}/glew-cmake ) + +# add_subdirectory( ${PROJECT_SOURCE_DIR}/glew-cmake) +# target_link_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/build/glew-cmake/lib) +# target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/glew-cmake/include/) +# target_link_libraries(${PROJECT_NAME} PRIVATE glew) + + add_subdirectory( ${PROJECT_SOURCE_DIR}/glfw ) target_link_libraries(${PROJECT_NAME} PRIVATE glfw) + find_package(OpenGl REQUIRED) -target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/include) -target_link_libraries(${PROJECT_NAME} PRIVATE OpenGL::GL) +target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/include ) +target_link_libraries(${PROJECT_NAME} PRIVATE OpenGL::GL ) + + diff --git a/glew-cmake b/glew-cmake deleted file mode 160000 index a5494db..0000000 --- a/glew-cmake +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a5494db414d62e7bcb19f9f8fd7ee660338ea08e diff --git a/src/main.cpp b/src/main.cpp index 7f150bc..deb2e85 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,6 +2,7 @@ #include #include + namespace py = pybind11; diff --git a/src/test_window.cpp b/src/test_window.cpp index 85ce1b5..1d3c6cf 100644 --- a/src/test_window.cpp +++ b/src/test_window.cpp @@ -1,6 +1,7 @@ #include #include #include +#include int tests::glfw_window(unsigned width,unsigned height, std::string title) {