Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Update cmake conan #150

Merged
merged 6 commits into from
Aug 25, 2021
Merged

Update cmake conan #150

merged 6 commits into from
Aug 25, 2021

Conversation

lefticus
Copy link
Member

@lefticus lefticus commented Aug 24, 2021

Upgrade uses of cmake-conan integration.

Fix #135

 * follow the example here https://github.com/conan-io/cmake-conan
   (modified to account for external conanfile.py)
 * use find_package instead of CONAN_PKG:: names
 * Add new cci remote

Note that the sdl2 and imgui-sfml don't work for anonymous users at the
moment
@lefticus
Copy link
Member Author

Finally all builds looking green again

Copy link
Contributor

@aminya aminya left a comment

Choose a reason for hiding this comment

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

I was able to build the project successfully

cmake/Conan.cmake Outdated Show resolved Hide resolved
@lefticus
Copy link
Member Author

We might also want to address the Windows multi-config, for working from inside of VS

https://github.com/conan-io/cmake-conan#using-conan_cmake_autodetect-and-conan_cmake_install-with-multi-configuration-generators

@ddalcino
Copy link
Collaborator

We might also want to address the Windows multi-config, for working from inside of VS

https://github.com/conan-io/cmake-conan#using-conan_cmake_autodetect-and-conan_cmake_install-with-multi-configuration-generators

Good point.

BTW, does anyone know what happened to the Travis-CI builds? I don't see them in the 'checks' section anymore. Is it because they changed how they provision compute time for open source projects, or because they changed their url from travis-ci.org to travis-ci.com?

cmake/Conan.cmake Outdated Show resolved Hide resolved
@lefticus
Copy link
Member Author

BTW, does anyone know what happened to the Travis-CI builds? I don't see them in the 'checks' section anymore. Is it because they changed how they provision compute time for open source projects, or because they changed their url from travis-ci.org to travis-ci.com?

I had kind of given up on travis and forgot about it entirely.

Related?
image

@ddalcino
Copy link
Collaborator

I had kind of given up on travis and forgot about it entirely.

Related?
image

Could be.

Travis CI went through a lot of changes last year, and IIRC, they provide a finite amount of compute time for open source projects now. You can renew the number of minutes for open source projects, but you need approval from a human at Travis-CI to do it; otherwise you need a paid account. Personally, I don't think there's any point in trying to use Travis for open source anymore, when there are great multi-platform alternatives like Appveyor and Github Actions.

Given what you've said, I would argue that it's time to remove Travis from this project.

This changes the CMakeLists.txt files in the SDL2 and IMGUI-SFML
example programs so that they use `find_package()` to locate
libraries, rather than depending directly on Conan.
Copy link
Collaborator

@ddalcino ddalcino left a comment

Choose a reason for hiding this comment

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

I'm going to approve this as-is. I've suggested changes to make multi-config generators work, but this PR is good enough to merge even without those changes.

Copy link
Contributor

@aminya aminya left a comment

Choose a reason for hiding this comment

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

I tested the build again, and it works

@aminya aminya merged commit a49af10 into main Aug 25, 2021
@aminya aminya deleted the update_cmake_conan branch August 25, 2021 23:13
ddalcino added a commit that referenced this pull request Aug 26, 2021
This enables mulit-config generators like Visual Studio and XCode, as requested in 
#150 (comment).

See [the cmake-conan docs](https://github.com/conan-io/cmake-conan#using-conan_cmake_autodetect-and-conan_cmake_install-with-multi-configuration-generators) 
for justification.
ddalcino added a commit to ddalcino/cpp_starter_project that referenced this pull request Aug 26, 2021
This follows cmake-conan's recommended approach for multi-configuration 
generators like Visual Studio or Xcode, as requested in
cpp-best-practices#150 (comment).

See docs at:
https://github.com/conan-io/cmake-conan#using-conan_cmake_autodetect-and-conan_cmake_install-with-multi-configuration-generators
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Align cmake-conan support using the last guidelines
3 participants