This is a draft cheat sheet. It is a work in progress and is not finished yet.
if command
if(expression) endif() |
if(expression) else() endif() |
if(expression) else() elseif(expression2) endif() |
True = 1, ON, YES, TRUE, Y, or a non-zero number. |
False = 0, OFF, NO, FALSE, N, IGNORE, "", or ends in the suffix '-NOTFOUND'. |
if(NOT expression) |
if(<expr1> AND <expr2>) |
if(<expr1> OR <expr2>) |
if(TARGET target-name) True if the given name is an existing target, built or imported. |
if(EXISTS full-path-file-name) if(EXISTS full-path-directory-name) |
if(IS_DIRECTORY directory-name) |
if(IS_ABSOLUTE path) |
Add Custom...
add_custom_command( OUTPUT output(s) COMMAND command arg(s) DEPENDS depend(s) WORKING_DIRECTORY dir COMMENT comment) This defines a command to generate specified OUTPUT file(s) |
add_custom_target( name [ALL] DEPENDS depends-on ... ) |
add_custom_command(TARGET target PRE_BUILD | PRE_LINK | POST_BUILD COMMAND command arg(s) WORKING_DIRECTORY dir COMMENT comment ) |
|
|
|
|
|