CMake KDE release

Alexander Neundorf neundorf at kde.org
Sun Jan 29 16:27:10 GMT 2006


On Sunday 29 January 2006 15:38, Christian Ehrlicher wrote:
> Alexander Neundorf schrieb:
...
> Here:
>
> test
> /abs/unix
> /abs/unix
> ../rel
> E:/kde/kdelibs/cmake/systeminfo/../rel
> d:/Programme/CMake 2.3.0/share/CMake
> E:/kde/kdelibs/cmake/systeminfo/d:/Programme/CMake 2.3.0/share/CMake

Thank you.
Please try again with the attached CMakeLists.txt .

> > if(WINDOWS AND NOT CYGWIN AND NOT MINGW)
>
> And why not 'If ( MSVC )' ?

Simple answer: because it doesn't work ;-)
Maybe it's for historic reasons, that CYGWIN, MINGW and BORLAND were all 
special cases for which special tests were introduced. I'll ask the cmake 
devs.

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net
-------------- next part --------------
macro(LOG line)
   message(STATUS ${line})
   file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AbsPathTest.txt "${line}\n")
endmacro(LOG line)

file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AbsPathTest.txt "test\n")

set(path1 "/abs/unix")
set(path2 "../rel")
set(path3 ${CMAKE_ROOT})

macro(GET_ABS_PATH _abs_filename _filename)
   if(${_filename} MATCHES "^([a-zA-Z]:)?/.+")
      set(${_abs_filename} ${_filename})
   else(${_filename} MATCHES "^([a-zA-Z]:)?/.+")
      set(${_abs_filename} ${CMAKE_CURRENT_SOURCE_DIR}/${_filename})
   endif(${_filename} MATCHES "^([a-zA-Z]:)?/.+")
endmacro(GET_ABS_PATH)

get_abs_path(abs ${path1})
log(${path1})
log(${abs})

get_abs_path(abs ${path2})
log(${path2})
log(${abs})

get_abs_path(abs "${path3}")
log(${path3})
log(${abs})



More information about the kde-core-devel mailing list