Git Product home page Git Product logo

Comments (10)

pezcode avatar pezcode commented on May 23, 2024 2

There's no code in .hpp files, it's just a regular C++ header. But yes, you'd still need an install directive for the libraries.

I can give this a try tomorrow (no promises 🤡)

from liblava.

TheLavaBlock avatar TheLavaBlock commented on May 23, 2024 1

Hi Julian, Good point.

Once C++20 modules are supported in CMake, liblava will be upgraded completely.
This means that header files are no longer needed.

Currently it has to be done manually or via script. Unfortunately.

from liblava.

pezcode avatar pezcode commented on May 23, 2024 1

@julianxhokaxhiu PR with preliminary install support: #18

Feel free to give it a try and report back

from liblava.

julianxhokaxhiu avatar julianxhokaxhiu commented on May 23, 2024

Hi @TheLavaBlock,

I am currently checking the library again for some progress, and I notice this issue is still open. As C++ 20 modules on CMake will not get supported until who known when, is there a way to workaround this issue? You mentioned then it can be done manually or via a script. I would be fine with both, but can you please give me a hint on what can be done?

I was checking this CMake function, but I'm not sure it's exactly what we need: https://cmake.org/cmake/help/v3.17/module/GenerateExportHeader.html

Any help on this topic is appreciated :)

Thank you in advance,
Julian

from liblava.

pezcode avatar pezcode commented on May 23, 2024

The canonic way to do it would be with the PUBLIC_HEADERS target property + specifying an install rule for each target: https://stackoverflow.com/a/40285224/862300

A really easy alternative is something like

install(DIRECTORY liblava/ DESTINATION include/liblava FILES_MATCHING PATTERN "*.hpp")

from liblava.

TheLavaBlock avatar TheLavaBlock commented on May 23, 2024

I like the easy alternative.

from liblava.

TheLavaBlock avatar TheLavaBlock commented on May 23, 2024

And yeah, C++20 modules with CMake will take a while.

from liblava.

julianxhokaxhiu avatar julianxhokaxhiu commented on May 23, 2024

But *.hpp files do contain code. So now I think probably another way of including liblava is just adding the whole /liblava dir into the include path, there is no need to pre-compile it.

Although at the same time, pre-compiling it would provide faster compilation for whichever library may link to liblava. So I'm not sure we can merge the pre-built lib files with public headers, which do contain code anyway inside. Or am I missing something here?

from liblava.

TheLavaBlock avatar TheLavaBlock commented on May 23, 2024

@julianxhokaxhiu can this be closed? Think #18 is doing a good job.

from liblava.

julianxhokaxhiu avatar julianxhokaxhiu commented on May 23, 2024

Absolutely! Thank you again

from liblava.

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.