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
Download sources automatically? #25
Comments
Certainly a good question, with many answers... The first answer is that the function So for now I will stick with the current manual solution. But I am always open for good pull requests. |
I think it's a very nice idea to download the source automatically. So I started a fork using ExternalProject_add. I successfully added minizip, libjpeg, libpng, zlib and curl. You can find it here. All those projects have git repositories on github. I use ExternalProject_add to download the source. After that the already existing cmake targets are executed... That was a little bit tricky but now it works 😌 However, as so often in life one begins with something before thinking 😄 now I realize, that it would have been much easier and more failsave to just add those repositories as submodules ❗ Then we could simply use We could also use the ExternalProject approach and simply let the command configure, build and install the projects. All from the projects I added - except libjpeg - had a CMakeLists.txt which makes the building process extremely easy. Only the approach I choose makes no sense 😭 ... |
I think the submodule approach is much easier. I will try to implement it tomorrow. |
@SrTobi The drawbacks with the submodule approach is that it will lock this the repo to a specific version of the respective library and it will also force the users to download ALL supported libraries, even though they only need a subset. |
@SrTobi FYI
The user can locally checkout any commit he wants within the submodule and versions referenced by this repository could represent the latest ones tested.
The real no-no is that quite many people just barely know about submodules and how to use them correctly which makes it inconvenient for them to use this convenience project 😉 |
Hi, is there any update on this? I am currently working on upgrading the third-party dependencies used by the FlightGear project (which uses these build scripts as a basis) and it would be great to have this functionality. I'm also willing to prepare a pull request for this - just let me know the approach you would prefer (I am slightly in favor of downloading released .zip files instead of submodules, as not all the dependencies we rely on use Git as their VCS, but I am fine with both choices - I just need to know which one to implement). |
Based on the feedback I received, I decided not to pursue this approach, the effort of download the zips is not bad. Of course, Cmake is capable to download zips using libCurl - that's what ExternalProjectAdd does. |
@AlessandroMenti There exists another fork which also have done some work regarding automatic downloading of sources. You might want to checkout: Have not tried this my self, so I don't know if this branch is working or is work in progress. @chrisjaquet would you mind comment on this? |
Hello, the branch does work, but it is, unfortunately, a quick "hack" that I did to quickly accomplish what I needed at the time. Please note the following differences from upstream:
I would, however, like to look at support for I hope this provides some clarity, but feel free to ask any questions you may have. |
I have added support for AppVeyor builds in the following commit: 8d8edd6 . This means that there will be prebuilt version of these dependencies available to download for the latest commit for Visual Studio 2015 & 2017, both 32-bit and 64-bit. The download links are posted on the For anyone desiring to write your own batch script for automating the build, the command section in the |
This is a question, not an issue really - why not use ExternalProjectAdd to download the sources automatically? (Don't have to use the build / install feature, it can be download only). Either from a zip or from source control with a stable branch name.
The text was updated successfully, but these errors were encountered: