Dear All, I try to add cairo-dock in buildroot but I have a problem with CMAKE based package. When I try to compile a CMAKE based package, cmake use the /usr/bin/pkg-config instead of the one compiled by buildroot. So pkg-config look for package on host and not in buildroot directory. Is there any solution to force cmake to use the correct pkg-config and find dependencies ? Best regards
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.