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

provide a simple example how to add an external #17

Open
maddanio opened this issue Apr 18, 2016 · 5 comments
Open

provide a simple example how to add an external #17

maddanio opened this issue Apr 18, 2016 · 5 comments

Comments

@maddanio
Copy link

maddanio commented Apr 18, 2016

Hi,
I would really like to use cpm in my project, but I can't figure out how to most simply add an external project. For example in my app I need an (iOS tuned version of) freetype:

https://github.com/cdave1/freetype2-ios.git

I was hoping I can just get this directly, but I feel I have to clone it and make it cpm ready? what about these json files you demonstrate for google test, can I just write one of those instead and place it in my own project?

@iauns
Copy link
Owner

iauns commented Apr 23, 2016

Ya it will be a little bit more complicated than using the repository as-is. It generally depends on the build system being used for the repository in-question.

For the linked repo, it looks like it is an xcode project. I assume you could do something like execute xcodebuild from an ExternalProject_Add CMake command. I have https://github.com/iauns/cpm-libuv which builds a project that doesn't require CMake but instead uses autconf. That's probably better to look at than the google-test repo since google-test uses CMake. Also, freetype2-ios may have a CMake repo laying around somewhere which could potentially make things easier.

@maddanio
Copy link
Author

ok, but I always have to make a repo for an external, right?

@maddanio
Copy link
Author

I cannot specify it "inline"? With ExternalProject I sadly loose the caching :(

@maddanio
Copy link
Author

maddanio commented May 4, 2016

how about adding an external that already uses cmake? do I still have to set up a repo with the cpm makefile, or can I specify directly?

@maddanio
Copy link
Author

maddanio commented May 4, 2016

ah, or I can just put it inside the repo itself, right? a tutorial for these things wold e cool :)

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

No branches or pull requests

2 participants