Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

How to make use of external ghc_filesystem library #474

Description

@penguinpee

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions