|
Lines 42-50
macro( tde_get_arg ARG_NAME COUNT RETURN REST )
Link Here
|
| 42 |
list( APPEND ${REST} ${ARGN} ) |
42 |
list( APPEND ${REST} ${ARGN} ) |
| 43 |
list( FIND ${REST} ${ARG_NAME} _arg_idx) |
43 |
list( FIND ${REST} ${ARG_NAME} _arg_idx) |
| 44 |
if( NOT ${_arg_idx} EQUAL -1 ) |
44 |
if( NOT ${_arg_idx} EQUAL -1 ) |
| 45 |
list( APPEND ${REST} ___ensure_list___ ) |
|
|
| 46 |
list( REMOVE_AT ${REST} ${_arg_idx} ) |
45 |
list( REMOVE_AT ${REST} ${_arg_idx} ) |
| 47 |
list( REMOVE_ITEM ${REST} ___ensure_list___ ) |
|
|
| 48 |
set( _i 0 ) |
46 |
set( _i 0 ) |
| 49 |
while( ${_i} LESS ${COUNT} ) |
47 |
while( ${_i} LESS ${COUNT} ) |
| 50 |
list( GET ${REST} ${_arg_idx} _arg ) |
48 |
list( GET ${REST} ${_arg_idx} _arg ) |
|
Lines 66-84
macro( tde_execute_process )
Link Here
|
| 66 |
tde_get_arg( MESSAGE 1 _message _rest_args ${ARGV} ) |
64 |
tde_get_arg( MESSAGE 1 _message _rest_args ${ARGV} ) |
| 67 |
tde_get_arg( RESULT_VARIABLE 1 _result_variable _tmp ${_rest_args} ) |
65 |
tde_get_arg( RESULT_VARIABLE 1 _result_variable _tmp ${_rest_args} ) |
| 68 |
tde_get_arg( COMMAND 1 _command _tmp ${_rest_args} ) |
66 |
tde_get_arg( COMMAND 1 _command _tmp ${_rest_args} ) |
|
|
67 |
tde_get_arg( OUTPUT_VARIABLE 1 _output_variable _tmp ${_rest_args} ) |
| 68 |
tde_get_arg( CACHE 3 _cache _rest_args2 ${_rest_args} ) |
| 69 |
|
| 70 |
# handle optional FORCE parameter |
| 71 |
if( DEFINED _cache ) |
| 72 |
list( GET _cache 2 _tmp ) |
| 73 |
if( _tmp STREQUAL FORCE ) |
| 74 |
set( _rest_args ${_rest_args2} ) |
| 75 |
else() |
| 76 |
tde_get_arg( CACHE 2 _cache _rest_args ${_rest_args} ) |
| 77 |
endif() |
| 78 |
endif() |
| 79 |
|
| 69 |
if( NOT DEFINED _result_variable ) |
80 |
if( NOT DEFINED _result_variable ) |
| 70 |
list( APPEND _rest_args RESULT_VARIABLE _exec_result ) |
81 |
list( APPEND _rest_args RESULT_VARIABLE _exec_result ) |
| 71 |
set( _result_variable _exec_result ) |
82 |
set( _result_variable _exec_result ) |
| 72 |
endif() |
83 |
endif() |
|
|
84 |
|
| 73 |
execute_process( ${_rest_args} ) |
85 |
execute_process( ${_rest_args} ) |
|
|
86 |
|
| 87 |
if( DEFINED _output_variable AND DEFINED _cache ) |
| 88 |
set( ${_output_variable} ${${_output_variable}} CACHE ${_cache} ) |
| 89 |
endif() |
| 90 |
|
| 74 |
if( ${_result_variable} ) |
91 |
if( ${_result_variable} ) |
| 75 |
if( DEFINED _message ) |
92 |
if( DEFINED _message ) |
| 76 |
message( FATAL_ERROR ${_message} ) |
93 |
tde_message_fatal( ${_message} ) |
| 77 |
else() |
94 |
else() |
| 78 |
if( ${${_result_variable}} MATCHES "^[0-9]+$" ) |
95 |
if( ${${_result_variable}} MATCHES "^[0-9]+$" ) |
| 79 |
set( ${_result_variable} "status ${${_result_variable}} returned!" ) |
96 |
set( ${_result_variable} "status ${${_result_variable}} returned!" ) |
| 80 |
endif() |
97 |
endif() |
| 81 |
message( FATAL_ERROR "Error executing '${_command}': ${${_result_variable}}" ) |
98 |
tde_message_fatal( "Error executing '${_command}': ${${_result_variable}}" ) |
| 82 |
endif() |
99 |
endif() |
| 83 |
endif() |
100 |
endif() |
| 84 |
endmacro( tde_execute_process ) |
101 |
endmacro( tde_execute_process ) |
|
Lines 268-273
macro( tde_add_ui_files _sources )
Link Here
|
| 268 |
add_custom_command( OUTPUT ${_ui_basename}.h ${_ui_basename}.cpp |
285 |
add_custom_command( OUTPUT ${_ui_basename}.h ${_ui_basename}.cpp |
| 269 |
COMMAND ${CMAKE_COMMAND} |
286 |
COMMAND ${CMAKE_COMMAND} |
| 270 |
-DUIC_EXECUTABLE:FILEPATH=${UIC_EXECUTABLE} |
287 |
-DUIC_EXECUTABLE:FILEPATH=${UIC_EXECUTABLE} |
|
|
288 |
-DTQT_REPLACE_SCRIPT:FILEPATH=${TQT_REPLACE_SCRIPT} |
| 271 |
-DTDE_QTPLUGINS_DIR:FILEPATH=${TDE_QTPLUGINS_DIR} |
289 |
-DTDE_QTPLUGINS_DIR:FILEPATH=${TDE_QTPLUGINS_DIR} |
| 272 |
-DUI_FILE:FILEPATH=${_ui_absolute_path} |
290 |
-DUI_FILE:FILEPATH=${_ui_absolute_path} |
| 273 |
-DMASTER_SOURCE_DIR:FILEPATH=${CMAKE_SOURCE_DIR} |
291 |
-DMASTER_SOURCE_DIR:FILEPATH=${CMAKE_SOURCE_DIR} |