From ac9a6e891fb26c8c41774be6f90c7a96f85d1942 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 25 Jun 2011 13:49:40 -0700 Subject: Fix the cross-compile toolchain script CMAKE_INSTALL_PREFIX is now properly set, and the pkgconfig env vars are set so it won't find .pc files for the default compiler. --- XCompile.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/XCompile.txt b/XCompile.txt index 665ceb1c..4403c735 100644 --- a/XCompile.txt +++ b/XCompile.txt @@ -12,7 +12,7 @@ SET(CMAKE_C_COMPILER "${HOST}-gcc") SET(CMAKE_CXX_COMPILER "${HOST}-g++") # here is where stuff gets installed to -SET(CMAKE_INSTALL_PREFIX "/usr/${HOST}/usr") +SET(CMAKE_INSTALL_PREFIX "/usr/${HOST}/usr" CACHE STRING "Install path prefix, prepended onto install directories." FORCE) # here is the target environment located SET(CMAKE_FIND_ROOT_PATH "/usr/${HOST}/usr") @@ -23,3 +23,8 @@ SET(CMAKE_FIND_ROOT_PATH "/usr/${HOST}/usr") set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + +# set env vars so that pkg-config will look in the appropriate directory for +# .pc files (as there seems to be no way to force using ${HOST}-pkg-config) +set(ENV{PKG_CONFIG_LIBDIR} "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") +set(ENV{PKG_CONFIG_PATH} "") -- cgit v1.2.3