[CMake] Question about if/else in Cmake

Sascha 'saigkill' Manns samannsml at directbox.com
Tue Mar 10 12:59:58 EDT 2009


Hello Mates,

i'm Sascha Manns from Germany. I'm new to the List, and i hope that i 
can learn more about CMake.
Actually i'm building for the openSUSE Build Service an Package called 
"freeremote".

The Package has the following in the CMakeLists.txt:
SET( CONFIGFILE_PATH ${PREFIX}/etc/freeremoted CACHE PATH "Path find 
config file" FORCE )
SET( MODULEFILE_PATH ${PREFIX}/lib/freeremoted CACHE PATH "Path find 
module file" FORCE )

That means, that the Package is builded into the Userspace.

So i modified it to use /etc and /usr/lib as Destination.

SET( CONFIGFILE_PATH /etc/freeremoted CACHE PATH "Path find config 
file" FORCE )
SET( MODULEFILE_PATH /usr/lib CACHE PATH "Path find module file" FORCE)

But this only runs for i586/i686 but not for x86_64.

It is possible to make:


ifarch ix86
SET(CONFIGFILE_PATH /usr/lib)
else
SET(CONFIGFILE_PATH /usr/lib64)
endif
-- 
Sincereley yours

Sascha Manns
openSUSE Marketing Team
openSUSE Build Service
Web: http://saschamanns.gulli.to
Project-Blog: http://lizards.opensuse.org/author/saigkill
Private-Blog: http://saschasbacktrace.blogspot.com

DISCLAIMER: Please note that in accordance with the German law on data 
retention, 
information on every electronic information exchange with me is retained 
for a period of six months. 
http://www.vorratsdatenspeicherung.de
http://www.ccc.de



More information about the CMake mailing list