KDE4_ADD_TEST_EXECUTABLE's properties don't work

Alexander Neundorf neundorf at kde.org
Fri Jun 22 02:29:53 CEST 2007


On Thursday 21 June 2007 04:17, Andreas Pakulat wrote:
> Hi,
>
> I just wanted to remove the need for knotifyrc to be installed and found
> out that the set_properties call in KDE4_ADD_TEST_EXECUTABLE doesn't
> have an effect at all. That means
>
> - the executable is put into kdelibs/bin instead of current binary dir
> - the -DKDESRCDIR is not included properly, I can't use the definition
>   in the src
>
> According to man cmake none of these two properties exist for
> set_target_properties.

Yes.


> I guess we have to move these two out of the set_target_properties and
> use the standard way of
>
> set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})

Yes. EXECUTABLE_OUTPUT_PATH is a directory-wide setting, so it will be active 
also for other stuff in this directory. I guess such test apps should go into 
their own subdirectory.

> add_definitions(-DKDESRCDIR=\\""${CMAKE_CURRENT_SOURCE_DIR}"\\")

This can be done with 
set_target_properties(... PROPERTIES COMPILE_FLAGS ... )

Alex


More information about the Kde-buildsystem mailing list