-
Notifications
You must be signed in to change notification settings - Fork 133
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
Add CI support, along with some fixes for Windows. #83
Conversation
.github/workflows/build.yml
Outdated
on: | ||
push: | ||
pull_request: | ||
branches: [ master ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the CI scripts, this is really nice.
Please address these notes and rebase. When doing so, please also add a signed-off-by line (git commit --amend -s
or ctrl-i
in Git Cola) to your commit message that certifies that you wrote or otherwise have the right to pass on these changes on as an open-source patch.
Adding a signoff certifies that you adhere to https://developercertificate.org/
Thanks
CMakeLists.txt
Outdated
@@ -34,7 +34,7 @@ | |||
cmake_minimum_required(VERSION 3.15.0) | |||
project(partio LANGUAGES CXX) | |||
|
|||
option(BUILD_SHARED_LIBS "Enabled shared libraries" ON) | |||
option(BUILD_SHARED_LIBS "Enabled shared libraries" OFF) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're better off passing -D BUILD_SHARED_LIBS=OFF
when invoking cmake via CI. Please assume a Linux/Unix environment. Windows-isms should be opt-in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Done!
$<INSTALL_INTERFACE:${ZLIB_INCLUDE_DIR}> | ||
$<BUILD_INTERFACE:${ZLIB_INCLUDE_DIR}>) | ||
target_link_libraries(partio PUBLIC ${ZLIB_LIBRARY}) | ||
target_link_libraries(partio PUBLIC ZLIB::ZLIB) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, the new target-based stuff is much nicer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
src/tools/CMakeLists.txt
Outdated
@@ -41,7 +41,7 @@ if (GLUT_FOUND AND OPENGL_FOUND) | |||
PRIVATE | |||
${PARTIO_LIBRARIES} | |||
GLUT::GLUT | |||
OpenGL::OpenGL | |||
OpenGL::GL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm.. we're relying on the use of libglvnd to handle all of our vendor-specific GL stuff. Can you install glvnd in the CI builders so that OpenGL::OpenGL
keeps working? If not, then a if (WIN32) ...
conditional can be used to set a variable that lets us keep using OpenGL::OpenGL
.
This could also be made into another option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a new option PARTIO_USE_GLVND
which is OFF
by default on Windows, and ON
everywhere else.
Other changes: * Add a new option PARTIO_USE_GLVND which is OFF by default on Windows. This option forces the use of OpenGL::GL over OpenGL::OpenGL * Use ZLIB::ZLIB to reference ZLIB, and add it to the public dependencies. * Rename GTEST_ENABLED to PARTIO_GTEST_ENABLED Signed-off-by: Matthäus G. Chajdas <dev@anteru.net>
Thanks for the feedback. I've addressed it (hopefully all of it) and made one more small change, renaming |
Thanks again, nicely done. It looks like I introduced a typo in Regarding |
hey Im glad I saw this! |
nvm I see the problem. |
Nicely done spotting that typo. It somehow didn't cause a problem, so I didn't notice it at all. And thanks for the merge! The reason I was suggesting to prefix it with |
That would be a nice option to add, thanks for bringing up the subproject use case. |
I'll prepare a PR :) |
Other changes:
OpenGL::OpenGL
withOpenGL::GL
, asOpenGL::OpenGL
doesn't work on Windows.ZLIB::ZLIB
to reference ZLIB, and add it to the public dependencies.I'm not 100% certain about the
OpenGL::GL
change, and I can easily make that conditional based on Windows if that's preferred, but I don't see use of EGL either so ... it's unclear ifOpenGL::OpenGL
is really needed. For the shared library, the correct fix would be to export all symbols that could be used by clients, but I'm not sure which ones those are so I'll rather err on the side of caution here.