<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi Sascha,<BR>
<BR>
I recently ported our existing autotool tests for lib vs. lib64 to CMake. I haven't thoroughly tested it yet, but I think it will suit your needs. I use the CMake global property FIND_LIBRARY_USE_LIB64_PATHS to record the use of either lib or lib64. Hope it helps.<BR>
<BR>
Regards,<BR>
Marcel Loose.<BR>
<BR>
&lt;code&gt;<BR>
&nbsp; # Determine if lib64 has to be used. This is somewhat tricky for the default<BR>
&nbsp; # case, because: Debian puts 64-bit libs in /lib and 32-bit libs in /lib32,<BR>
&nbsp; # but SuSE and RedHat put 64-bit libs in /lib64 and 32-bit libs in /lib.<BR>
&nbsp; # We cannot use `uname -s`, since all distros return &quot;Linux&quot;, hence we must<BR>
&nbsp; # test for the presence of these lib directories instead. To further<BR>
&nbsp; # complicate matters, Debian distros may create a symlink /lib64; therefore<BR>
&nbsp; # we should make sure that /lib64 is a &quot;real&quot; directory, not a symlink.<BR>
&nbsp; if(DEFINED ENABLE_LIB64)<BR>
&nbsp;&nbsp;&nbsp; if(ENABLE_LIB64)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)<BR>
&nbsp;&nbsp;&nbsp; else(ENABLE_LIB64)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)<BR>
&nbsp;&nbsp;&nbsp; endif(ENABLE_LIB64)<BR>
&nbsp; else(DEFINED ENABLE_LIB64)<BR>
&nbsp;&nbsp;&nbsp; execute_process(COMMAND test -d /lib64 -a ! -L /lib64 RESULT_VARIABLE result<BR>
)<BR>
&nbsp;&nbsp;&nbsp; if(NOT result)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)<BR>
&nbsp;&nbsp;&nbsp; else(NOT result)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)<BR>
&nbsp;&nbsp;&nbsp; endif(NOT result)<BR>
&nbsp; endif(DEFINED ENABLE_LIB64)<BR>
&lt;/code&gt;<BR>
<BR>
<BR>
On Tue, 2009-03-10 at 21:27 +0100, Sascha 'saigkill' Manns wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hello Alexander,

is this right?

SET( CONFIGFILE_PATH /etc/freeremoted CACHE PATH &quot;Path find config file&quot; 
FORCE )
SET( MODULEFILE_PATH /usr/lib CACHE PATH &quot;Path find module file&quot; FORCE)
option(USE_LIB64_DIR &quot;Enable this option to use lib64 instead of lib/&quot; 
FALSE)

Or must i run this Option extra?
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>