[CMake] include_directories and qt4_wrap_cpp

Dennis Schridde devurandom at gmx.net
Mon Aug 2 11:19:02 EDT 2010


On Monday 02 August 2010 17:09:09 Clinton Stimpson wrote:
> On 08/02/2010
09:02 AM, Michael Wild wrote:
> > I didn't look into the source code, but
looks like there is some REGEX
> > REPLACE which is too simplistic. Probably
there is a missing escape for
> > the . character, thus making it also match
/framework, instead of just
> > .framework.
> 
> Yeah, that seems to be the
problem.
> Dennis, can you edit your Qt4Macros.cmake in the cmake
installation and
> fix the following section to
> 
>    FOREACH(_current
${_inc_DIRS})
>      IF("${_current}" MATCHES "\.framework/?$")
>       
STRING(REGEX REPLACE "/[^/]+\.framework" "" framework_path
>
"${_current}")
>        SET(${_moc_flags} ${${_moc_flags}}
"-F${framework_path}")
>      ELSE("${_current}" MATCHES "\.framework/?$")
>
       SET(${_moc_flags} ${${_moc_flags}} "-I${_current}")
>     
ENDIF("${_current}" MATCHES "\.framework/?$")
>    ENDFOREACH(_current
${_inc_DIRS})
I copied your code into that section of Qt4Macros and
commented the old code out. This makes it error out. The error is the same
when I just replace ".framework" with "\.framework".

---------------
CMake
Error at /usr/share/cmake/Modules/Qt4Macros.cmake:74 (IF):
  Syntax error in
cmake code at

    :74

  when parsing string

    \.framework/?$

  Invalid
escape sequence \.
Call Stack (most recent call first):
 
/usr/share/cmake/Modules/Qt4Macros.cmake:149 (QT4_GET_MOC_FLAGS)
 
CMakeLists.txt:77 (qt4_wrap_cpp)


CMake Error at
/usr/share/cmake/Modules/Qt4Macros.cmake:149 (QT4_GET_MOC_FLAGS):
  A
logical block opening on the line

   
/usr/share/cmake/Modules/Qt4Macros.cmake:74 (IF)

  is not closed.
Call
Stack (most recent call first):
  CMakeLists.txt:77 (qt4_wrap_cpp)


--
Configuring incomplete, errors occurred!
---------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100802/d581a394/attachment.pgp>


More information about the CMake mailing list