summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-06-25 13:49:40 -0700
committerChris Robinson <[email protected]>2011-06-25 13:49:40 -0700
commitac9a6e891fb26c8c41774be6f90c7a96f85d1942 (patch)
treedafbeb3385ccb6da9eea83271329fc8af0b5e46f
parent1fc44d57889ecde9bd3693dbaaceb0e9039bdfb0 (diff)
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.
-rw-r--r--XCompile.txt7
1 files changed, 6 insertions, 1 deletions
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} "")