On Tuesday 29 July 2008, Matthias Kretz wrote: > Hi, > > for all the automoc4 users that cannot use KDE4Macros.cmake I'd like to add > the following two macros:
The names should be AUTOMOC4_ADD_EXECUTABLE() and AUTOMOC4_ADD_LIBRARY(), so they conform to the cmake modules style guide. > macro(ADD_AUTOMOC4_EXECUTABLE _target_NAME) > set(_SRCS ${ARGN}) > > set(_add_executable_param) > foreach(_argName "WIN32" "MACOSX_BUNDLE" "EXCLUDE_FROM_ALL") > list(GET _SRCS 0 _arg) > if(_arg STREQUAL _argName) > list(APPEND _add_executable_param ${_argName}) > list(REMOVE_AT _SRCS 0) > endif(_arg STREQUAL _argName) > endforeach(_argName) I think that loop isn't perfect. automoc4_add_executable(foo EXCLUDE_FROM_ALL WIN32 ${sources}) Here WIN32 will be ignored, right ? It may make sense to add a special function for that to the cmake LIST() command. Alex _______________________________________________ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem