Channels
  • packetzero

    packetzero

    2 years ago
    So back to adding a 3rd party lib. I created the following files : libraries/cmake/source/conveyor/CMakeLists.txt libraries/cmake/source/modules/Findconveyor.cmake third-party/conveyor/osquery.library third-party/conveyor/BUCK Added new submodule: libraries/cmake/source/conveyor/src Updated /CMakeLists.txt: +"Linux,Darwin,Windows:conveyor"
    Yet, I still get the following cmake error: CMake Error at CMakeLists.txt:148 (find_package): By not providing "Findconveyor.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "conveyor", but CMake did not find one. Could not find a package configuration file provided by "conveyor" with any of the following names: conveyorConfig.cmake conveyor-config.cmake
  • Stefano Bonicatti

    Stefano Bonicatti

    2 years ago
    that's really strange.. I just tried just to add the Findconveyor.cmake file and the "Linux,Darwin,Windows:conveyor", and works here. Though I have a suspicion. Could you try to run from the build dir (I'm assuming you're on Linux)
    cmake -LAH <source_dir> | grep CMAKE_MODULE_PATH
    and copy here what comes out?
  • packetzero

    packetzero

    2 years ago
    i'm on MacOS
  • Stefano Bonicatti

    Stefano Bonicatti

    2 years ago
    ah I see, should be the same 🙂
    at the same time, have you tried deleting the
    CMakeCache.txt
    file and reconfiguring?
  • packetzero

    packetzero

    2 years ago
    CMAKE_MODULE_PATH:STRING=/Users/me/osq/osquery/cmake/modules;/Users/me/osq/osquery/libraries/cmake/source_migration/modules;/Users/me/osq/osquery/libraries/cmake/facebook/modules;/Users/me/osq/osquery/libraries/cmake/source_migration/modules;/Users/me/osq/osquery/libraries/cmake/facebook/modules;/Users/me/osq/osquery/libraries/cmake/source_migration/modules;/Users/me/osq/osquery/libraries/cmake/facebook/modules
  • Stefano Bonicatti

    Stefano Bonicatti

    2 years ago
    I've just found a bug where some paths to the modules folder gets added each time one configures with CMake.. so I wonder if you hit some limit there and everything goes haywire from there.
  • packetzero

    packetzero

    2 years ago
    yeah, I usually delete cache file before I run cmake.
  • Stefano Bonicatti

    Stefano Bonicatti

    2 years ago
    hum ok, so those paths seems fine right?
    meaning, at first look they seem but, are they correctly pointing to an existing path? (the ones in CMAKE_MODULE_PATH)
  • packetzero

    packetzero

    2 years ago
    yes they do
    this is a good version, right? cmake version 3.15.4
  • Stefano Bonicatti

    Stefano Bonicatti

    2 years ago
    oh wait, I got it now. You have to use source_migration, because for macOS we are only getting some library from source
    you need to use the other path, not
    source
    but
    source_migration
  • packetzero

    packetzero

    2 years ago
    ah... will try that.
    thx
  • Stefano Bonicatti

    Stefano Bonicatti

    2 years ago
    Though if that's a library that goes on all platform, then I would leave it in
    source
    , but write another
    Find<library>.cmake
    which simply includes the one under
    source
    , as we are doing right now
  • packetzero

    packetzero

    2 years ago
    And that is case whether I use a submodule or download a tgz ?
  • Stefano Bonicatti

    Stefano Bonicatti

    2 years ago
    Yes, but what you do then in the Find<library>.cmake is different, specifically in how you provide the targets
    or actually no, scratch that, this is still the source layer, sorry I was thinking to binary releases
  • packetzero

    packetzero

    2 years ago
    okay, so I am adding a file
    libraries/cmake/source_migration/modules/Findconveyor.cmake
  • Stefano Bonicatti

    Stefano Bonicatti

    2 years ago
    yeah, which should just include the other Find under source
    as we are doing for the other libraries which we have "migrated"
  • packetzero

    packetzero

    2 years ago
    thanks @Stefano Bonicatti That got me past it.