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

How to make use of external ghc_filesystem library #474

Open
penguinpee opened this issue Sep 18, 2023 · 1 comment
Open

How to make use of external ghc_filesystem library #474

penguinpee opened this issue Sep 18, 2023 · 1 comment

Comments

@penguinpee
Copy link
Contributor

I'm trying to update MorphIO to the latest release in Fedora. Since we already have ghc_filesystem packaged as gulrak-filesystem (different name to avoid clashes with Haskell packages), I would like to use that.

I followed the example of HighFive which allows for either using the external library or the bundled (git submodule) version. Please see my fork for details of the patch.

With that patch applied the build fails with:

CMake Error at src/CMakeLists.txt:64 (target_include_directories):
  Error evaluating generator expression:

    $<TARGET_PROPERTY:ghc_filesystem,INTERFACE_INCLUDE_DIRECTORIES>

  Target "ghc_filesystem" not found.

This is where my knowledge of cmake ends. What else do I need to change to make MorphIO / cmake use the library available locally?

I've run cmake with --debug-find-pkg=ghc_filesystem and that told me the package was found:

  find_package considered the following locations for ghc_filesystem's Config
  module:

    /builddir/build/BUILD/MorphIO-3.3.6/redhat-linux-build/CMakeFiles/pkgRedirects/ghc_filesystemConfig.cmake
    /builddir/build/BUILD/MorphIO-3.3.6/redhat-linux-build/CMakeFiles/pkgRedirects/ghc_filesystem-config.cmake
    /usr/ghc_filesystemConfig.cmake
    /usr/ghc_filesystem-config.cmake
    /usr/lib64/cmake/ghc_filesystem/ghc_filesystemConfig.cmake
    /usr/lib64/cmake/ghc_filesystem/ghc_filesystem-config.cmake

  The file was found at

    /usr/lib64/cmake/ghc_filesystem/ghc_filesystem-config.cmake
@penguinpee
Copy link
Contributor Author

I've got it building by removing the "offending" line (and the one preceding it) from src/CMakeLists.txt.

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

1 participant