Am Mittwoch, 20. Juli 2011 schrieb Pavel Sanda:
> Stephan Witt wrote:
> > In case of interest
> > 
> > QT_VERSION="4.10.3" sh -c 'v="0x0"; for i in ${QT_VERSION//./ } ; do case
> > $i in 10) v=$v"0a" ;; 11) v=$v"0b" ;; 12) v=$v"0c" ;; 13) v=$v"0d" ;;
> > 14) v=$v"0e" ;; 15) v=$v"0f" ;; *) v=$v"0"$i ;; esac ; done; echo $v'
> > 
> > prints 0x0040a03
> 
> how do cmake people solve this in windows? pavel

Cmake has its own arithmetic. In this case see top-level CMakeLists.txt:626
...
        # Compute qt4-version from ${QTVERSION}
        if(QTVERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+).*")
                MATH(EXPR QT4_VERSION 
"(${CMAKE_MATCH_1}<<16)|(${CMAKE_MATCH_2}<<8)|${CMAKE_MATCH_3}")
        endif()
...

        Kornel

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to