[CMake] adding headers for QTCreator

Petr Kmoch petr.kmoch at gmail.com
Tue Oct 9 03:44:28 EDT 2012


Hi Witold.

Using RELATIVE does not change where the files are looked for, only how
they are reported. I believe you need this:

file(GLOB Demo_HEADERS RELATIVE ${CMAKE_SOURCE_DIR}/include "include/*.h")

Hope this help.

Petr

On Tue, Oct 9, 2012 at 9:34 AM, Witold E Wolski <wewolski at gmail.com> wrote:

> Hi,
>
> I try to add all header files in the include directory so they are visible
> in QTCreator.
> My attempt looks like this.
>
> file(GLOB Demo_HEADERS RELATIVE ${CMAKE_SOURCE_DIR}/include "*.h")
> message(STATUS ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
> message(STATUS "${Demo_HEADERS}")
> message(STATUS ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
> add_library(headers SHARED ${Demo_HEADERS} Dummy.cpp)
>
> Unfortunately the ${Demo_HEADERS} thing is empty :(
>
> regards
>
>
>
> --
> Witold Eryk Wolski
>
> Triemlistrasse 155
> 8047 Zuerich
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121009/a1469c31/attachment.htm>


More information about the CMake mailing list