Skip to content
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 error #13

Closed
JLospinoso opened this issue May 9, 2016 · 4 comments
Closed

CMake error #13

JLospinoso opened this issue May 9, 2016 · 4 comments

Comments

@JLospinoso
Copy link

Hello, I've got a cmake issue on Windows 10 x64, VS 2015 u1:

fruit\cmake_build>cmake .. -G "Visual Studio 14 2015 Win64"

I'm attaching cmake_build.zip, but for brevity here is the error that stops cmake:

C:\Users\josh\projects\Fruitfly\dep\fruit\cmake_build\CMakeFiles\CMakeTmp\src.cxx(2): fatal error C1083: Cannot open include file: 'cxxabi.h': No such file or directory [C:\Users\josh\projects\Fruitfly\dep\fruit\cmake_build\CMakeFiles\CMakeTmp\cmTC_fcf0e.vcxproj]

Done Building Project "C:\Users\josh\projects\Fruitfly\dep\fruit\cmake_build\CMakeFiles\CMakeTmp\cmTC_fcf0e.vcxproj" (default targets) -- FAILED.

It looks like a libstdc++ header; is there a Windows corollary? If not, is there any plan to support Windows in the future?

@poletti-marco
Copy link
Contributor

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.

@JLospinoso
Copy link
Author

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?

@poletti-marco
Copy link
Contributor

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).

@jjalvarezl
Copy link
Contributor

jjalvarezl commented Nov 10, 2018

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants