gitcmakebuildroot

With git as site method, how do I specify CMakeLists.txt directory?


I'm working with buildroot and I'm trying to fetch a package with git, but buildroot expects CMakeLists.txt to be on the root of the repo, which is not my case.

That's the repo I'm trying to fetch from: https://github.com/Azure/azure-storage-cpp. As you can see, CMakeLists.txt file is in Microsoft.WindowsAzure.Storage directory, not in the root. So, when I try to build, I get:

CMake Error: The source directory "buildroot/output/build/azure-storage-cpp-v7.5.0" does not appear to contain CMakeLists.txt.

So I wonder, how do I set CMakeLists.txt directory?

That's my makefile:

################################################################################
#
# azure-storage-cpp
#
################################################################################
AZURE_STORAGE_CPP_VERSION = v7.5.0
AZURE_STORAGE_CPP_SITE = https://github.com/Azure/azure-storage-cpp
AZURE_STORAGE_CPP_SITE_METHOD = git
AZURE_STORAGE_CPP_GIT_SUBMODULES = YES
AZURE_STORAGE_CPP_LICENSE = MIT
AZURE_STORAGE_CPP_LICENSE_FILES = LICENSE
AZURE_STORAGE_CPP_DEPENDENCIES = libcpprestsdk
AZURE_STORAGE_CPP_build_as_dynamic=ON

$(eval $(cmake-package))

Solution

  • There is {package}_SUBDIR variable, where you can specify a subdirectory in the package's root, which is passed to cmake as the source one:

    AZURE_STORAGE_CPP_SUBDIR = Microsoft.WindowsAzure.Storage