Skip to content
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

Fix for issue #16 #31

Merged
merged 2 commits into from Aug 29, 2017
Merged

Conversation

NauticalMile64
Copy link
Contributor

Description - What's this PR do?

Fixes issue #16.

Impacts/Risks of These Changes?

When glfw has been installed using vcpkg this correctly includes and links glfw. Will behave in the original way when the find_package method fails.

How should this be tested?

Generate build using CMake and build the project.

@NauticalMile64
Copy link
Contributor Author

Ok, I see it failed the check. Investigating...

@NauticalMile64
Copy link
Contributor Author

NauticalMile64 commented Aug 4, 2017

Waiting on microsoft/vcpkg/issues/1597

@NauticalMile64
Copy link
Contributor Author

Ok, second attempt. let's see how Travis-Cl handles it now.

Copy link
Owner

@louis-langholtz louis-langholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, first time for me using GitHub's review process. Not sure if I press Submit review now nor whether this is a "Comment" "Approve" or "Request changes". Going with "Comment" for the moment.

target_link_libraries(
Testbed
PlayRho
glfw
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this addition of glfw need to instead be glfw3 perhaps?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or would it be better to use ${GLFW_STATIC_LIBRARIES} instead of glfw or glfw3?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Err... or maybe ${GLFW_LIBRARY}?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found out that the name of the Imported Target is always glfw when the package manager is vcpkg. That code works (builds on my pc anyway). The travis-ci build should be taking the else() branch on line 82, and building in the same way as before.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm new to pull request reviews as well. But I've since reverted the commit, and re-applied it. So the View changes button no longer takes me anywhere useful.

Copy link
Owner

@louis-langholtz louis-langholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe Request changes is more appropriate. Hmm...

@louis-langholtz
Copy link
Owner

@NauticalMile64 Thank you doing this work. I see that 1 of the 3 checks failed for this pull request - the continuous-integration/travis-ci/pr check. The Travis-CI log shows: /usr/bin/ld: cannot find -lglfw as the error that the linker reported (for both compilers). Is this something you're aware of and working on fixing? Thanks again.

@NauticalMile64
Copy link
Contributor Author

Ok I think I figured it out, fixing now...

@NauticalMile64
Copy link
Contributor Author

I realized I had omitted the link_directories command from earlier. Including it has not changed the output for two of the builds. I'm going to go through the steps to run the travis-ci builds locally before trying anymore changes now.

As a side note, it's also concerning that build 89.1 failed to build playrho.

@louis-langholtz
Copy link
Owner

Best I can tell, you'd submitted an update and the GitHub system tried to check that it was good. Unfortunately, just before that, I'd submitted a push that broke the Travis-CI build. So the update you provided failed on Travis because of my changes. I've fixed what I'd broken since then.

@louis-langholtz
Copy link
Owner

I see you'd closed this PR. Wasn't it a good set of code changes? I really appreciate your working on this stuff.

@NauticalMile64
Copy link
Contributor Author

It doesn't pass the Travis-CI build, and I can't tell why it's not working. I wanted to get it set up on my home pc, but I can't get it working without installing docker, which requires AMD-V to be activated on my machine. The only way to do this is through the BIOS, and my current motherboard (MSI Tomahawk B350) doesn't make this option available.

I am unsure how to proceed.

@louis-langholtz
Copy link
Owner

I think your last change set only didn't pass the Travis-CI build because I broke the Travis-CI build just before you submitted the PR for the tests it went through. So the Travis-CI build would have broke because I'd already broken it.

I believe I need to get out of the habit of doing push's and into doing pull requests like anyone else but it may take me a while to get myself there (and break force of habit). My story is that push's and pull's don't really 100% live completely in harmony with each other on GitHub at least not with the automatic checks that are in place now.

@NauticalMile64
Copy link
Contributor Author

No worries Louis. I think you've developed a lot of good habits, too! I'll commit and push my changes again when I get the chance (probably Monday) to see if it works.

@NauticalMile64
Copy link
Contributor Author

Commenting to reopen.

@louis-langholtz louis-langholtz dismissed their stale review August 28, 2017 23:17

May not be needed.

glfw is now included with the following precedence:
1. user specified values for `GLFW_INCLUDE_DIRS`, `GLFW_LIBRARY_DIRS`, `GLFW_STATIC_LIBRARIES`, and `OPENGL_INCLUDE_DIR`
2. using `find_package`
3. using `pkg-config`

The `target_link_libraries` function is split for reasons mentioned in microsoft/vcpkg#1597.
@NauticalMile64
Copy link
Contributor Author

Ok looks like it passed travis-ci finally. I had changed the order of the include_directories, link_directories and add_executable calls, which Windows was just fine with, but triggered the cannot find -lglfw3 error in the travis-ci build. Re-arranging those function calls fixed the issue.

I'm going to reset this one more time and make one clean commit for the CMakeLists.txt file and then add an extra commit or two updating the documentation on building the Testbed.

@coveralls
Copy link

coveralls commented Aug 29, 2017

Coverage Status

Coverage remained the same at 92.867% when pulling a24f880 on NauticalMile64:master into 6b3c796 on louis-langholtz:master.

@louis-langholtz louis-langholtz merged commit 80e6f68 into louis-langholtz:master Aug 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants