Author: jgardou Date: Wed Aug 13 16:30:52 2014 New Revision: 63878
URL: http://svn.reactos.org/svn/reactos?rev=63878&view=rev Log: [CMAKE] - Properly serve reactos.cab dependencies - try 2 CORE-8435 #comment this should do it, please retest. Regarding the bot problem, touching boot/bootdata/packages/reactos.dff forces regenerating reactos.inf and reactos.cab
Modified: trunk/reactos/boot/bootdata/packages/CMakeLists.txt trunk/reactos/cmake/CMakeMacros.cmake
Modified: trunk/reactos/boot/bootdata/packages/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/CMak... ============================================================================== --- trunk/reactos/boot/bootdata/packages/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/packages/CMakeLists.txt [iso-8859-1] Wed Aug 13 16:30:52 2014 @@ -31,24 +31,18 @@ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff.dyn )
-# And now we build reactos.cab - -# First we create reactos.inf +# And now we build reactos.inf add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf COMMAND native-cabman -C ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff -L ${CMAKE_CURRENT_BINARY_DIR} -I -P ${REACTOS_SOURCE_DIR} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff native-cabman)
-# Then we create the actual cab file using a custom target -add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/reactos.cab - COMMAND native-cabman -C ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff -RC ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf -L ${CMAKE_CURRENT_BINARY_DIR} -N -P ${REACTOS_SOURCE_DIR} - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf native-cabman) - -add_custom_target(reactos_cab DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.cab) +# reactos.cab generation will be made later (cf. CMakeMacros.cmake - create iso lists) +add_custom_target(reactos_cab_inf DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf)
add_cd_file( TARGET reactos_cab - FILE ${CMAKE_CURRENT_BINARY_DIR}/reactos.cab ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf + FILE ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf DESTINATION reactos NO_CAB FOR bootcd regtest) +
Modified: trunk/reactos/cmake/CMakeMacros.cmake URL: http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/CMakeMacros.cmake?rev... ============================================================================== --- trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] Wed Aug 13 16:30:52 2014 @@ -316,15 +316,11 @@ file(APPEND ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff.dyn ""${__relative_file}" ${_num}\n") unset(__relative_file) if(_CD_TARGET) - #manage dependency - add_dependencies(reactos_cab ${_CD_TARGET}) - # add this so that the combination make target/fast reactos_cab/fast bootcd/fast properly detects that reactos.cab must be rebuilt - if (CMAKE_BUILD_TOOL STREQUAL "make") - add_custom_command(TARGET ${_CD_TARGET} - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E touch ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff) - endif() + #manage dependency - target level + add_dependencies(reactos_cab_inf ${_CD_TARGET}) endif() + # manage dependency - file level + set_property(GLOBAL APPEND PROPERTY REACTOS_CAB_DEPENDS ${_CD_FILE}) endif() endif() #end bootcd
@@ -378,6 +374,22 @@ endfunction()
function(create_iso_lists) + # generate reactos.cab before anything else + get_property(_filelist GLOBAL PROPERTY REACTOS_CAB_DEPENDS) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/reactos.cab + COMMAND native-cabman -C ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff -RC ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.inf -N -P ${REACTOS_SOURCE_DIR} + DEPENDS ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.inf native-cabman ${_filelist}) + + add_custom_target(reactos_cab DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.cab) + add_dependencies(reactos_cab reactos_cab_inf) + + add_cd_file( + TARGET reactos_cab + FILE ${CMAKE_CURRENT_BINARY_DIR}/reactos.cab + DESTINATION reactos + NO_CAB FOR bootcd regtest) + get_property(_filelist GLOBAL PROPERTY BOOTCD_FILE_LIST) string(REPLACE ";" "\n" _filelist "${_filelist}") file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcd.lst "${_filelist}")