diff options
author | Don Kjer <don@lindenlab.com> | 2012-10-24 18:19:22 +0000 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2012-10-24 18:19:22 +0000 |
commit | 27933214f41e369337fc83ec7a9ecb2a9cdbaeee (patch) | |
tree | ccec5eeebd243fed4ede877a00ee65dc538e5a86 /indra/cmake/Variables.cmake | |
parent | 7f025073771b808b65f85e5f2e67e0944e903c33 (diff) |
Switching to system osmesa library instead of pre-packaged library
Diffstat (limited to 'indra/cmake/Variables.cmake')
-rw-r--r-- | indra/cmake/Variables.cmake | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 895b3003db..54c77da64e 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -70,10 +70,6 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(LINUX ON BOOl FORCE) - if (INSTALL_PROPRIETARY) - set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.") - endif (INSTALL_PROPRIETARY) - # If someone has specified a word size, use that to determine the # architecture. Otherwise, let the architecture specify the word size. if (WORD_SIZE EQUAL 32) @@ -97,18 +93,37 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (WORD_SIZE EQUAL 32) set(DEB_ARCHITECTURE i386) + set(FIND_LIBRARY_USE_LIB64_PATHS OFF) + set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib32 ${CMAKE_SYSTEM_LIBRARY_PATH}) else (WORD_SIZE EQUAL 32) set(DEB_ARCHITECTURE amd64) + set(FIND_LIBRARY_USE_LIB64_PATHS ON) endif (WORD_SIZE EQUAL 32) - execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH RESULT_VARIABLE DPKG_RESULT OUTPUT_VARIABLE DPKG_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) + execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH + RESULT_VARIABLE DPKG_RESULT + OUTPUT_VARIABLE DPKG_ARCH + OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) #message (STATUS "DPKG_RESULT ${DPKG_RESULT}, DPKG_ARCH ${DPKG_ARCH}") if (DPKG_RESULT EQUAL 0) set(CMAKE_LIBRARY_ARCHITECTURE ${DPKG_ARCH}) + set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/${DPKG_ARCH} /usr/local/lib/${DPKG_ARCH} ${CMAKE_SYSTEM_LIBRARY_PATH}) endif (DPKG_RESULT EQUAL 0) + include(ConfigurePkgConfig) + set(LL_ARCH ${ARCH}_linux) set(LL_ARCH_DIR ${ARCH}-linux) + + if (INSTALL_PROPRIETARY) + # Only turn on headless if we can find osmesa libraries. + include(FindPkgConfig) + pkg_check_modules(OSMESA osmesa) + if (OSMESA_FOUND) + set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.") + endif (OSMESA_FOUND) + endif (INSTALL_PROPRIETARY) + endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |