Git Product home page Git Product logo

Comments (4)

poletti-marco avatar poletti-marco commented on May 1, 2024

Thanks for the report, but Fruit is currently not supported on Windows due to compiler bugs. See #9.

Once those are resolved I'll fix any remaining issues (including the build error you mentioned) but for now there's no chance Fruit would work anyway.

Closing this bug as duplicate.

from fruit.

JLospinoso avatar JLospinoso commented on May 1, 2024

Ok, thanks!

It will be excellent to have Windows support at some point. I've been looking for a good DI container for some time now.

As an aside, what is the preferred way to pull Fruit into another CMake project? Currently, I've got:

set(FRUIT_LIBRARY /usr/local/lib/libfruit.so)
INCLUDE_DIRECTORIES(/usr/local/include/fruit/)

Is it possible to use find_package? I'm unsure if make install can be configured as such?

from fruit.

poletti-marco avatar poletti-marco commented on May 1, 2024

As an aside, what is the preferred way to pull Fruit into another CMake project?

If you use the binary packages (or if you compile from source and install in the same locations), target_link_libraries(<target> fruit) does the trick.
If you want to install Fruit in /usr/local instead for some reason, I'm not sure. If you want to use find_package, you'll have to write a FindFruit.cmake file (shouldn't be too hard, but Fruit doesn't ship with one).

from fruit.

jjalvarezl avatar jjalvarezl commented on May 1, 2024

I wrote a little cmake code to find fruit. Hope it helps.

First set hint dir and find_package commands:

...
set(FRUIT_INSTALLED_DIR "path to /usr"
...
find_package(fruit REQUIRED)
...

Then write a FindFriut.cmake module (only tested on Linux for now).

find_path(FRUIT_INCLUDE_DIR fruit.h
    HINTS FRUIT_INSTALLED_DIR
    PATH_SUFFIXES include/fruit include fruit
)

find_library(FRUIT_LIBRARY
  NAMES fruit
  HINTS FRUIT_INSTALLED_DIR
  PATH_SUFFIXES lib ${FRUIT_INSTALLED_DIR}
)

include(${CMAKE_MODULE_PATH}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(fruit DEFAULT_MSG FRUIT_LIBRARY FRUIT_INCLUDE_DIR)

from fruit.

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.