Giter Club home page Giter Club logo

Comments (4)

lattice0 avatar lattice0 commented on July 21, 2024

In fact, the only problem I'm having is that the generated .h files are going somewhere else that I can't access on my main project which uses yours by doing add_subdirectory. I just needed the include files to build mine. The simplest solution I can think of is adding the line

configure_file("${PROJECT_SOURCE_DIR}/src/rtptypes.h.in" "${PROJECT_BINARY_DIR}/src/rtptypes.h")

but with PROJECT_SOURCE_DIR instead of PROJECT_BINARY_DIR and for the other two configuration files add too.

Do you have a better idea?

from jrtplib.

j0r1 avatar j0r1 commented on July 21, 2024

A few thoughts:

  • If you only need the headers, then you need to take care that the settings they use match those of the compiled library (so the rtpconfig.h should contain the settings that were used when actually compiling the library)
  • In my opinion it's not a good idea to move the generated rtptypes.h and rtpconfig.h to the source directory: it would definitely mess things up when using different builds (with different settings) based on the same sources

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)

from jrtplib.

lattice0 avatar lattice0 commented on July 21, 2024

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?

from jrtplib.

j0r1 avatar j0r1 commented on July 21, 2024

You say

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.

But why not? Why not build and install the library and header files in another location, and include those in your project?

from jrtplib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.