on Sat Jun 02 2012, Peter Kümmel <syntheticpp-hi6Y0CQ0nG0-AT-public.gmane.org> 
wrote:

> On 02.06.2012 21:21, Peter Kümmel wrote:
>> On 02.06.2012 19:54, Rolf Eike Beer wrote:
>>>
>>>   It will look into e.g. /usr/lib and /usr/lib64
>>> (depending on your system), but not into /usr/lib/x86_64-linux-gnu. You
>>> can tell it to try by setting CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu
>
>>> before calling CMake.
>>
>> But the doku says it looks into "<prefix>/lib/<arch>  if 
>> CMAKE_LIBRARY_ARCHITECTURE is set",
>> and when I test it with cmake 2.8.8 and 2.8.5 this simple CMAkeLists.txt,
>>
>> cmake_minimum_required(VERSION 2.8)
>> message(STATUS  "CMAKE_LIBRARY_ARCHITECTURE: ${CMAKE_LIBRARY_ARCHITECTURE}")
>> Find_PACKAGE(BZip2 REQUIRED)
>>
>> finds libbzip2:
>>
>> -- CMAKE_LIBRARY_ARCHITECTURE: x86_64-linux-gnu
>> -- Found BZip2: /usr/lib/x86_64-linux-gnu/libbz2.so (found version "1.0.5")
>> -- Looking for BZ2_bzCompressInit in /usr/lib/x86_64-linux-gnu/libbz2.so
>> -- Looking for BZ2_bzCompressInit in /usr/lib/x86_64-linux-gnu/libbz2.so - 
>> found
>>
>> Dave is CMAKE_LIBRARY_ARCHITECTURE set on your system?
>
> $ cmake .. --trace 2>&1 | grep x86
>
> gives here:
>
> /home/synth/t/CMakeFiles/CMakeSystem.cmake(6):  SET(CMAKE_SYSTEM_PROCESSOR 
> x86_64 )
> /home/synth/t/CMakeFiles/CMakeSystem.cmake(11):  
> SET(CMAKE_HOST_SYSTEM_PROCESSOR x86_64 )
> /home/synth/t/CMakeFiles/CMakeCCompiler.cmake(32):  
> SET(CMAKE_C_LIBRARY_ARCHITECTURE x86_64-linux-gnu )
> /home/synth/t/CMakeFiles/CMakeCCompiler.cmake(43):  
> SET(CMAKE_LIBRARY_ARCHITECTURE x86_64-linux-gnu )
> /home/synth/t/CMakeFiles/CMakeCCompiler.cmake(50):
> SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES
> /usr/lib/gcc/x86_64-linux-gnu/4.6.1;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib
> )

Further:

--8<---------------cut here---------------start------------->8---
dave@Ubu12:/tmp/qb/build$ ~/bin/cmake ../src --trace 2>&1 | grep 
CMakeCCompiler.cmake
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(1):  SET(CMAKE_C_COMPILER 
/usr/bin/gcc )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(2):  SET(CMAKE_C_COMPILER_ARG1  )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(3):  SET(CMAKE_C_COMPILER_ID GNU )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(4):  SET(CMAKE_C_COMPILER_VERSION 
4.6.3 )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(5):  SET(CMAKE_C_PLATFORM_ID 
Linux )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(7):  SET(CMAKE_AR /usr/bin/ar )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(8):  SET(CMAKE_RANLIB 
/usr/bin/ranlib )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(9):  SET(CMAKE_LINKER /usr/bin/ld 
)
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(10):  SET(CMAKE_COMPILER_IS_GNUCC 
1 )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(11):  SET(CMAKE_C_COMPILER_LOADED 
1 )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(12):  SET(CMAKE_COMPILER_IS_MINGW 
)
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(13):  
SET(CMAKE_COMPILER_IS_CYGWIN )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(14):  IF(CMAKE_COMPILER_IS_CYGWIN 
)
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(19):  
SET(CMAKE_C_COMPILER_ENV_VAR CC )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(21):  IF(CMAKE_COMPILER_IS_MINGW )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(24):  SET(CMAKE_C_COMPILER_ID_RUN 
1 )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(25):  
SET(CMAKE_C_SOURCE_FILE_EXTENSIONS c )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(26):  
SET(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(27):  
SET(CMAKE_C_LINKER_PREFERENCE 10 )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(30):  SET(CMAKE_C_SIZEOF_DATA_PTR 
 )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(31):  SET(CMAKE_C_COMPILER_ABI  )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(32):  
SET(CMAKE_C_LIBRARY_ARCHITECTURE  )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(34):  IF(CMAKE_C_SIZEOF_DATA_PTR )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(38):  IF(CMAKE_C_COMPILER_ABI )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(42):  
IF(CMAKE_C_LIBRARY_ARCHITECTURE )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(46):  SET(CMAKE_C_HAS_ISYSROOT  )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(49):  
SET(CMAKE_C_IMPLICIT_LINK_LIBRARIES  )
/tmp/qb/build/CMakeFiles/CMakeCCompiler.cmake(50):  
SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES  )
--8<---------------cut here---------------end--------------->8---

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to