diff options
author | Amol Bhave <ambhave@fb.com> | 2018-10-02 08:48:27 -0700 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2018-10-04 22:26:22 +0200 |
commit | b3c64797db86b4c2ff315a25ce063b983e4ae71c (patch) | |
tree | db6ba026f4c8e23d9c456d7978bbf4716398f85b /include | |
parent | 149dcc26d132dffa6f0ee92878c5954bb95bfe79 (diff) | |
download | upstream-b3c64797db86b4c2ff315a25ce063b983e4ae71c.tar.gz upstream-b3c64797db86b4c2ff315a25ce063b983e4ae71c.tar.bz2 upstream-b3c64797db86b4c2ff315a25ce063b983e4ae71c.zip |
build: use CMAKE_SOURCE_SUBDIR variable to cmake.mk
Sometimes, the CMakeLists.txt file is not in the root directory of a
repo. In those cases, the CMAKE_SOURCE_SUBDIR variable can be specified
to use CMakeLists.txt from a subdirectory instead.
Signed-off-by: Amol Bhave <ambhave@fb.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/cmake.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/cmake.mk b/include/cmake.mk index 900dae1d4a..b66665d20a 100644 --- a/include/cmake.mk +++ b/include/cmake.mk @@ -7,8 +7,8 @@ ifneq ($(findstring c,$(OPENWRT_VERBOSE)),) endif CMAKE_BINARY_DIR = $(PKG_BUILD_DIR)$(if $(CMAKE_BINARY_SUBDIR),/$(CMAKE_BINARY_SUBDIR)) -CMAKE_SOURCE_DIR = $(PKG_BUILD_DIR) -HOST_CMAKE_SOURCE_DIR = $(HOST_BUILD_DIR) +CMAKE_SOURCE_DIR = $(PKG_BUILD_DIR)$(if $(CMAKE_SOURCE_SUBDIR),/$(CMAKE_SOURCE_SUBDIR)) +HOST_CMAKE_SOURCE_DIR = $(HOST_BUILD_DIR)$(if $(CMAKE_SOURCE_SUBDIR),/$(CMAKE_SOURCE_SUBDIR)) MAKE_PATH = $(firstword $(CMAKE_BINARY_SUBDIR) .) ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) |