comparison cmake/FindD.cmake @ 203:d3383b16f1d7

Add a 'NO_DEPS_SOURCES' option to the 'add_d_target' macro. And use it for resources and forms in QtD examples.
author SokoL_SD
date Mon, 13 Jul 2009 17:27:34 +0000
parents b426da0c9720
children bc1525b955d8
comparison
equal deleted inserted replaced
202:57c3714ed282 203:d3383b16f1d7
280 set(type_tmp SOURCES) 280 set(type_tmp SOURCES)
281 set(TYPE_tmp) 281 set(TYPE_tmp)
282 set(INCLUDES_tmp ) 282 set(INCLUDES_tmp )
283 set(FLAGS_tmp ) 283 set(FLAGS_tmp )
284 set(SOURCES_tmp ) 284 set(SOURCES_tmp )
285 set(GEN_FILES_tmp )
285 set(OBJECTS_tmp ) 286 set(OBJECTS_tmp )
286 set(LIBS_tmp ) 287 set(LIBS_tmp )
287 set(LIB_PATHS_tmp) 288 set(LIB_PATHS_tmp)
288 set(DEPENDS_tmp) 289 set(DEPENDS_tmp)
289 set(OUTPUT_PATH_tmp ) 290 set(OUTPUT_PATH_tmp )
290 set(compile_flags_tmp ${D_FLAGS}) 291 set(compile_flags_tmp ${D_FLAGS})
291 set(additional_commands_tmp ) 292 set(additional_commands_tmp )
292 set(link_flags_tmp ) 293 set(link_flags_tmp )
293 294
294 ## Parse parameters list. 295 ## Parse parameters list.
295 set(params_tmp TYPE INCLUDES FLAGS SOURCES OBJECTS LIBS LIB_PATHS DEPENDS OUTPUT_PATH) 296 set(params_tmp TYPE INCLUDES FLAGS SOURCES NO_DEPS_SOURCES OBJECTS LIBS LIB_PATHS DEPENDS OUTPUT_PATH)
296 foreach(arg_tmp ${ARGN}) 297 foreach(arg_tmp ${ARGN})
297 set(founded_type_tmp) 298 set(founded_type_tmp)
298 if(${arg_tmp} STREQUAL "DETECT_DEPENDS") 299 if(${arg_tmp} STREQUAL "DETECT_DEPENDS")
299 set(auto_detect_depentes_tmp 1) 300 set(auto_detect_depentes_tmp 1)
300 set(founded_type_tmp 1) 301 set(founded_type_tmp 1)
402 if(CMAKE_BUILD_TYPE) 403 if(CMAKE_BUILD_TYPE)
403 string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER) 404 string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER)
404 set(compile_flags_tmp ${compile_flags_tmp} ${D_${CMAKE_BUILD_TYPE_UPPER}_FLAGS}) 405 set(compile_flags_tmp ${compile_flags_tmp} ${D_${CMAKE_BUILD_TYPE_UPPER}_FLAGS})
405 endif(CMAKE_BUILD_TYPE) 406 endif(CMAKE_BUILD_TYPE)
406 407
407 if(auto_detect_depentes_tmp) 408 if(auto_detect_depentes_tmp)
408 get_files_depends(SOURCES_tmp ${SOURCES_tmp}) 409 get_files_depends(tmp ${SOURCES_tmp})
410 set(SOURCES_tmp ${tmp})
409 endif(auto_detect_depentes_tmp) 411 endif(auto_detect_depentes_tmp)
412 set(SOURCES_tmp ${SOURCES_tmp} ${NO_DEPS_SOURCES})
410 413
411 set(used_ar_tmp) 414 set(used_ar_tmp)
412 get_filename_component(output_path_tmp ${output_name_tmp} PATH) 415 get_filename_component(output_path_tmp ${output_name_tmp} PATH)
413 if (NOT not_obj_tmp) 416 if (NOT not_obj_tmp)
414 compile_d_files(${name} objs_tmp ${SOURCES_tmp} FLAGS ${compile_flags_tmp}) 417 compile_d_files(${name} objs_tmp ${SOURCES_tmp} FLAGS ${compile_flags_tmp})