[CMake] Handle lib64 library on Linux

Sara Rolfe smrolfe at u.washington.edu
Mon May 23 13:27:03 EDT 2011


Hi Eric,

Thanks for your reply.  I tried setting the  
FIND_LIBRARY_USE_LIB64_PATHS property, but this did not resolve the  
problem.  I will read through the bug report you linked to.  Below is  
my CMakeLists.txt file.  Could you let me know if you see any issues?

Thanks,
Sara

cmake_minimum_required(VERSION 2.6)

PROJECT(Geo)

FIND_PACKAGE(ITK)
IF(ITK_FOUND)
	INCLUDE( ${USE_ITK_FILE} )
ENDIF(ITK_FOUND)

FIND_PACKAGE(VTK)
IF(VTK_FOUND)
INCLUDE( ${USE_VTK_FILE} )
ENDIF(VTK_FOUND)


ADD_EXECUTABLE(SubsampleVolume SubsampleVolume.cxx )

set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)

TARGET_LINK_LIBRARIES(SubsampleVolume
	ITKNumerics ITKIO ITKBasicFilters vtkRendering vtkIO vtkWidgets 	 
vtkHybrid)

On May 22, 2011, at 12:14 AM, Eric Noulard wrote:

> 2011/5/22 Sara Rolfe <smrolfe at u.washington.edu>:
>> The latest version of CMake, cmake-2.8.4-Linux-i386.tar.gz does not  
>> looking
>> in /lib64 paths.  Could you let me know which version of CMake you  
>> are
>> referring to, that checks this path?
>
> 2.8.4 should definitely have this is the
> FIND_LIBRARY_USE_LIB64_PATHS global property.
>
> $ cmake --help-property FIND_LIBRARY_USE_LIB64_PATHS
>
>  FIND_LIBRARY_USE_LIB64_PATHS
>       Whether FIND_LIBRARY should automatically search lib64  
> directories.
>
>       FIND_LIBRARY_USE_LIB64_PATHS is a boolean specifying whether the
>       FIND_LIBRARY command should automatically search the lib64  
> variant of
>       directories called lib in the search path when building 64-bit
>       binaries.
>
> This should be automatically set unless you are on Debian.
> However like I said before the multilib/lib64 issue is more complex  
> than that
> so read the comments of the following bug report:
> http://public.kitware.com/Bug/view.php?id=12037
>
> and may be related bugs therein and you should find the needed  
> informations
> including what works what does not.
>
> That said may be you can give us a small precise example
> (i.e. a strip down version of your CMakeLists.txt which exhibit the  
> issue)
> of what is not working for you and we may give more precise answer.
>
>
> -- 
> Erk
> Membre de l'April - « promouvoir et défendre le logiciel libre » -
> http://www.april.org



More information about the CMake mailing list