Giter Club home page Giter Club logo

Comments (8)

aminya avatar aminya commented on June 9, 2024

Where is the strange part?

from project_options.

ClausKlein avatar ClausKlein commented on June 9, 2024
-- Up-to-date: /Users/clausklein/Workspace/cpp/stage/usr/.//include
-- Up-to-date: /Users/clausklein/Workspace/cpp/stage/usr/.//include/greeter
-- Up-to-date: /Users/clausklein/Workspace/cpp/stage/usr/.//include/greeter/greeter.h

And this info in not right:

cat: /Users/clausklein/Workspace/cpp/stage/usr/share/greeter/usage

    find_package(greeter CONFIG REQUIRED)
    target_link_libraries(main PRIVATE  greeter::greeter greeter::project_options greeter::project_warnings)

see

set_target_properties(greeter::greeter PROPERTIES
  INTERFACE_COMPILE_FEATURES "cxx_std_20"
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "fmt::fmt;greeter::project_warnings;greeter::project_options"
  INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "include"
)

from project_options.

aminya avatar aminya commented on June 9, 2024

It seems correct to me. I don't see any issue here.

from project_options.

ClausKlein avatar ClausKlein commented on June 9, 2024

It seems correct to me. I don't see any issue here.

Yes, "seems" it is correct, but may be prevented to be clear.
It looks strange in context of the other install messages. see normal-path

And https://discourse.cmake.org/t/target-include-directories-mylib-system-is-exported-without-import-prefix/5359 !

from project_options.

ClausKlein avatar ClausKlein commented on June 9, 2024

The correct usage message should:

find_package(greeter CONFIG REQUIRED)
target_link_libraries(main PRIVATE greeter::greeter)

from project_options.

aminya avatar aminya commented on June 9, 2024

It seems correct to me. I don't see any issue here.

Yes, "seems" it is correct, but may be prevented to be clear. It looks strange in context of the other install messages. see normal-path

And discourse.cmake.org/t/target-include-directories-mylib-system-is-exported-without-import-prefix/5359 !

The reporting is just for information and debugging purposes. CMake itself should normalize the paths before installation if that is important for you.

from project_options.

aminya avatar aminya commented on June 9, 2024

target_link_libraries(main PRIVATE greeter::greeter)

That is subjective. When you export greeter::project_optinos, you cannot expect CMake to hide that target. Someone might really want to link with greeter::project_options.

However, it might be useful to add an option to hide this from the usage file.

from project_options.

ClausKlein avatar ClausKlein commented on June 9, 2024

The correct usage message should:

find_package(greeter CONFIG REQUIRED)
target_link_libraries(main PRIVATE greeter::greeter)

This links fmt::fmt;greeter::project_warnings;greeter::project_options implicitly.

from project_options.

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.