-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide CMake package #453
Conversation
You still have to copy by hand in install prefix.
I tested on Windows and Linux. tested by
pip install .
find_package(Glad REQUIRED)
glad_add_library(glad_gl_core_33 REPRODUCIBLE API gl:core=3.3) Also tested by
set(GLAD_SOURCES_DIR "${PROJECT_SOURCE_DIR}/external/glad/")
add_subdirectory("${GLAD_SOURCES_DIR}/cmake" glad_cmake)
glad_add_library(glad_gl_core_33 REPRODUCIBLE API gl:core=3.3) All works |
When using the following CMake snippet in my local project, CMake will fail saying it can't find add_subdirectory("${FASTGLTF_DEPS_DIR}/glad/cmake" glad_cmake)
# Let the glad script generate the glad headers
glad_add_library(fg_glad_gl46 REPRODUCIBLE EXCLUDE_FROM_ALL LOADER API gl:core=4.6) However, if I change the -list(APPEND CMAKE_PREFIX_PATH ${GLAD_SOURCES_DIR})
-find_package(Glad REQUIRED)
+include(./GladConfig.cmake) Should I make this into an issue or provide the PR to fix this? Note that I am on Windows using CLion and CMake 3.27.8. |
Consider opening an issue.
|
set(GLAD_SOURCES_DIR "${FASTGLTF_DEPS_DIR}/glad")
add_subdirectory("${GLAD_SOURCES_DIR}/cmake" glad_cmake) I assume this is how it will work. |
I now understand why everything worked without specifying the path. |
That would not have made any difference because glad's
Shall I open a pull request? Are you 100% positive it doesn't induce any other issues? |
I thought that I don't mind PR. I guess @Dav1dde feels the same way. And thanks. |
Closes #452