[CMake] Re: Help getting -l and -L arguments from apr-config

Trevor Kellaway tkellaway at asl-electronics.co.uk
Fri May 4 08:50:10 EDT 2007


Hi,

> The following snippet will send the strings "1", "2" and "3" 
> to the messages console, each of them on its own line:
> 
>   SET(FOO "1 2 3")
>   STRING(REPLACE " " ";" FOO_LIST "${FOO}")
>   FOREACH(item ${FOO_LIST})
>     MESSAGE(${item})
>   ENDFOREACH(item ${FOO_LIST})

The "Mastering CMake" book (recommended) also claims you can use this
(although I haven't tried it):

	SEPARATE_ARGUMENTS(VARIABLE)

 SEPARATE_ARGUMENTS: Split space separated arguments into a semi-colon
list separated list.
 All spaces are replaced by ";"

 - TrevK


More information about the CMake mailing list