Title
#core
packetzero

packetzero

11/07/2019, 6:54 PM
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"
6:54 PM
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

11/07/2019, 7:12 PM
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

11/07/2019, 7:26 PM
i'm on MacOS
Stefano Bonicatti

Stefano Bonicatti

11/07/2019, 7:28 PM
ah I see, should be the same 🙂
7:28 PM
at the same time, have you tried deleting the
CMakeCache.txt
file and reconfiguring?
packetzero

packetzero

11/07/2019, 7:29 PM
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

11/07/2019, 7:29 PM
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

11/07/2019, 7:29 PM
yeah, I usually delete cache file before I run cmake.
Stefano Bonicatti

Stefano Bonicatti

11/07/2019, 7:30 PM
hum ok, so those paths seems fine right?
7:30 PM
meaning, at first look they seem but, are they correctly pointing to an existing path? (the ones in CMAKE_MODULE_PATH)
packetzero

packetzero

11/07/2019, 7:31 PM
yes they do
7:34 PM
this is a good version, right? cmake version 3.15.4
Stefano Bonicatti

Stefano Bonicatti

11/07/2019, 7:34 PM
oh wait, I got it now. You have to use source_migration, because for macOS we are only getting some library from source
7:35 PM
you need to use the other path, not
source
but
source_migration
packetzero

packetzero

11/07/2019, 7:35 PM
ah... will try that.
7:35 PM
thx
Stefano Bonicatti

Stefano Bonicatti

11/07/2019, 7:36 PM
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

11/07/2019, 7:36 PM
And that is case whether I use a submodule or download a tgz ?
Stefano Bonicatti

Stefano Bonicatti

11/07/2019, 7:37 PM
Yes, but what you do then in the Find<library>.cmake is different, specifically in how you provide the targets
7:39 PM
or actually no, scratch that, this is still the source layer, sorry I was thinking to binary releases
packetzero

packetzero

11/07/2019, 7:40 PM
okay, so I am adding a file
libraries/cmake/source_migration/modules/Findconveyor.cmake
Stefano Bonicatti

Stefano Bonicatti

11/07/2019, 7:40 PM
yeah, which should just include the other Find under source
7:40 PM
as we are doing for the other libraries which we have "migrated"
packetzero

packetzero

11/07/2019, 7:47 PM
thanks @Stefano Bonicatti That got me past it.
Stefano Bonicatti

Stefano Bonicatti

11/07/2019, 7:49 PM
You're welcome!