summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-09-27 17:54:52 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-09-27 17:54:52 -0700
commita4b223248eac077c7d8e00c5fbb9f5fb067cc9bd (patch)
tree760a282276c5bf6e4095b0944b1a08a3bfd32d87 /indra/cmake
parent7fc48fb1259d3dbceed5248d8ccda39048d6ba8d (diff)
parente6688f993f82d2683e3eadce96c893959c94be2d (diff)
Merge
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake1
-rw-r--r--indra/cmake/PNG.cmake2
-rw-r--r--indra/cmake/Variables.cmake15
-rw-r--r--indra/cmake/run_build_test.py18
4 files changed, 26 insertions, 10 deletions
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 2dd296bf12..95ed5d6bc8 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -221,6 +221,7 @@ elseif(LINUX)
libcrypto.so.0.9.7
libdb-4.2.so
libexpat.so
+ libexpat.so.1
libgmock_main.so
libgmock.so.0
libgmodule-2.0.so
diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake
index 4d0b7b2d8d..f6522d9e2f 100644
--- a/indra/cmake/PNG.cmake
+++ b/indra/cmake/PNG.cmake
@@ -9,5 +9,5 @@ if (STANDALONE)
else (STANDALONE)
use_prebuilt_binary(libpng)
set(PNG_LIBRARIES png12)
- set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
+ set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/libpng12)
endif (STANDALONE)
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index bfaf3f4f26..230e228c62 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -54,19 +54,20 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(LINUX ON BOOl FORCE)
# If someone has specified a word size, use that to determine the
- # architecture. Otherwise, let the architecture specify the word size.
+ # architecture. Otherwise, let the compiler specify the word size.
+ # Using uname will break under chroots and other cross arch compiles. RC
if (WORD_SIZE EQUAL 32)
set(ARCH i686)
elseif (WORD_SIZE EQUAL 64)
set(ARCH x86_64)
else (WORD_SIZE EQUAL 32)
- execute_process(COMMAND uname -m COMMAND sed s/i.86/i686/
- OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
- if (ARCH STREQUAL x86_64)
- set(WORD_SIZE 64)
- else (ARCH STREQUAL x86_64)
+ if(CMAKE_SIZEOF_VOID_P MATCHES 4)
+ set(ARCH i686)
set(WORD_SIZE 32)
- endif (ARCH STREQUAL x86_64)
+ else(CMAKE_SIZEOF_VOID_P MATCHES 4)
+ set(ARCH x86_64)
+ set(WORD_SIZE 64)
+ endif(CMAKE_SIZEOF_VOID_P MATCHES 4)
endif (WORD_SIZE EQUAL 32)
set(LL_ARCH ${ARCH}_linux)
diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py
index ffc32525a4..37aa75e364 100644
--- a/indra/cmake/run_build_test.py
+++ b/indra/cmake/run_build_test.py
@@ -82,10 +82,24 @@ def main(command, libpath=[], vars={}):
dirs = os.environ.get(var, "").split(os.pathsep)
# Append the sequence in libpath
print "%s += %r" % (var, libpath)
- dirs.extend(libpath)
+ for dir in libpath:
+ # append system paths at the end
+ if dir in ('/lib', '/usr/lib'):
+ dirs.append(dir)
+ # prepend non-system paths
+ else:
+ dirs.insert(0, dir)
+
+ # Filter out some useless pieces
+ clean_dirs = []
+ for dir in dirs:
+ if dir and dir not in ('', '.'):
+ clean_dirs.append(dir)
+
# Now rebuild the path string. This way we use a minimum of separators
# -- and we avoid adding a pointless separator when libpath is empty.
- os.environ[var] = os.pathsep.join(dirs)
+ os.environ[var] = os.pathsep.join(clean_dirs)
+ print "%s = %r" % (var, os.environ[var])
# Now handle arbitrary environment variables. The tricky part is ensuring
# that all the keys and values we try to pass are actually strings.
if vars: