From 7d0984f71e9bdfc1502a20d928e89d11e148b6a1 Mon Sep 17 00:00:00 2001 From: Nemurimasu Neiro Date: Mon, 13 Sep 2010 16:40:16 +0000 Subject: [PATCH] stay away from find_library! due to an undocumented feature of find_xxx functions in CMake, no additional libraries may be found after the first call to a find_xxx function that searches the prebuilt libraries folder. CMake will request the folder contents *at most once* and libraries added by install.py will be missed. --- linden/indra/cmake/JPEG.cmake | 6 +----- linden/indra/cmake/OPENAL.cmake | 8 +++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/linden/indra/cmake/JPEG.cmake b/linden/indra/cmake/JPEG.cmake index de9667e89..144f913cf 100644 --- a/linden/indra/cmake/JPEG.cmake +++ b/linden/indra/cmake/JPEG.cmake @@ -12,11 +12,7 @@ else (STANDALONE) if (LINUX) set(JPEG_LIBRARIES jpeg) elseif (DARWIN) - find_library(JPEG_LIBRARIES - NAMES jpeg.62 - PATHS ${ARCH_PREBUILT_DIRS_RELEASE} - NO_DEFAULT_PATH - ) + set(JPEG_LIBRARIES ${ARCH_PREBUILT_DIRS_RELEASE}/libjpeg.62.dylib) elseif (WINDOWS) set(JPEG_LIBRARIES jpeglib) endif (LINUX) diff --git a/linden/indra/cmake/OPENAL.cmake b/linden/indra/cmake/OPENAL.cmake index 0ac9fb291..4f0e0cca7 100644 --- a/linden/indra/cmake/OPENAL.cmake +++ b/linden/indra/cmake/OPENAL.cmake @@ -21,11 +21,9 @@ if (OPENAL) elseif (DARWIN) # Look for for system's OpenAL.framework - find_library(OPENAL_LIB - NAMES openal.1 - PATHS ${ARCH_PREBUILT_DIRS_RELEASE} - NO_DEFAULT_PATH - ) + # Nemu: This code has never looked for the system's OpenAL.framework + # Nemu: should it? + set(OPENAL_LIB ${ARCH_PREBUILT_DIRS_RELEASE}/libopenal.1.dylib) else (WINDOWS) set(OPENAL_LIB openal) endif (WINDOWS)