-
Notifications
You must be signed in to change notification settings - Fork 219
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
Cmake command to only build include files #12
Comments
In fact, the only problem I'm having is that the generated
but with Do you have a better idea? |
A few thoughts:
But I don't really understand the problem. If I understand correctly, you need the headers, but not the compiled library in your project, right? Then where is the compiled library coming from? (You'll still need to link against it) |
For the purpose of compiling and installing JRTPLIB I think the cmake file is great, the files are going to be installed into the system. If I want to compile a library that uses yours, like https://github.com/Ansersion/myRtspClient, I'd just include the installed header files from the system. However the compilation will use the headers generated for my system, not for other systems. That's ok in general but not for Android I guess. In order to build for Android, there's no way of installing the headers into the system and then using them to build my project. The way I'm doing right now is to add JRTPLIB as a subdirectory to be built before the main project. However, the header files generated by JRTPLIB compilation are needed, so I added a dependency. I had to add a dependency to the shared library target, but it could be a simple dependency to the configure files (if possible). Anyways, even for the shared library target I'm not being able to get the genrated headers because they are installed into a custom folder of the android project, but that has nothing to do with the main problem of needing the header files to build projects based on yours. Do you have a better idea? |
You say
But why not? Why not build and install the library and header files in another location, and include those in your project? |
I'm working on top of https://github.com/Ansersion/myRtspClient. It doesn't have cmake, I'm adding so it can work on Android. The problem is that in order for me to link it together with with JRTPLIB, I need to build with JRTPLIB source files. But for now, when I
add_subdirectory
the jrtplib in the myRtspClient's cmakelists file, it will build the headers but in the end it will also build the entire jrtplib, which is unnecesary.Wouldn't it be great to have a way to build only the include files?
The text was updated successfully, but these errors were encountered: