| Summary: | CMake use host pkg-config | ||
|---|---|---|---|
| Product: | buildroot | Reporter: | Damien <damien> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | buildroot |
| Priority: | P5 | ||
| Version: | 2013.02 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: | cairo-dock.mk | ||
|
Description
Damien
2013-10-30 09:46:47 UTC
1/ Make sure your package depends on 'host-pkgconf', by doing something like <pkg>_DEPENDENCIES = host-pkgconf 2/ Make sure your package uses the cmake-package infrastructure, as described at http://buildroot.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages. This will ensure that the directory where our cross pkg-config is installed is in the PATH, and before /usr/bin where the native pkg-config is. Let us know if that fixes the problem for you. Created attachment 5108 [details]
cairo-dock.mk
What about something like:
diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index 0e08722..70014b5 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -62,7 +62,7 @@ ifeq ($(5),target)
define $(2)_CONFIGURE_CMDS
(cd $$($$(PKG)_BUILDDIR) && \
rm -f CMakeCache.txt && \
- $$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
+ $(TARGET_MAKE_ENV) $$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
-DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
-DCMAKE_INSTALL_PREFIX="/usr" \
$$($$(PKG)_CONF_OPT) \
@@ -74,7 +74,7 @@ else
define $(2)_CONFIGURE_CMDS
(cd $$($$(PKG)_BUILDDIR) && \
rm -f CMakeCache.txt && \
- $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
+ $(HOST_MAKE_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
-DCMAKE_INSTALL_SO_NO_EXE=0 \
-DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" \
thanks a lot, it's work with your patch. |