So back to adding a 3rd party lib. I created the f...
# core
p
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
s
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?
p
i'm on MacOS
s
ah I see, should be the same 🙂
at the same time, have you tried deleting the
CMakeCache.txt
file and reconfiguring?
p
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
s
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.
p
yeah, I usually delete cache file before I run cmake.
s
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)
p
yes they do
this is a good version, right? cmake version 3.15.4
s
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
p
ah... will try that.
thx
s
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
p
And that is case whether I use a submodule or download a tgz ?
s
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
p
okay, so I am adding a file
libraries/cmake/source_migration/modules/Findconveyor.cmake
s
yeah, which should just include the other Find under source
as we are doing for the other libraries which we have "migrated"
p
thanks @Stefano Bonicatti That got me past it.
s
You're welcome!