Open KaustubhDandekar opened 1 year ago
CMAKE_SYSROOT or other simular options should be used to prevent cmake to find packages from host system when crossing compiling.
With modern cmake , we do not use Protobuf_LIBRARY
, Protobuf_INCLUDE_DIR
or any thing set by cmake module, and we use cmake CONFIG package instead.
I am already setting CMAKE_SYSROOT along with android ndk toolchain which is working fine for few other libraries.
If I don't set the Protobuf_INCLUDE_DIR
option it throws following error
-- Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR)
CMake Error at /usr/local/Cellar/cmake/3.26.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.26.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/usr/local/Cellar/cmake/3.26.4/share/cmake/Modules/FindProtobuf.cmake:650 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:378 (find_package)
Not sure what am I missing here.
Do you compile protobuf with NDK, could you try to use --debug-find-pkg=Protobuf
to check if the search directories contains the directory of installed protobuf?
This issue was marked as stale due to lack of activity.
Hi I am getting linking error while trying to cross-compile opentelemetry for android platform when OTLP_HTTP is set to true. Installed protobuf version 3.21.12 using homebrew on my mac. Sharing the options set on cmake command