mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 08:03:03 +00:00
[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 svn path=/trunk/; revision=63878
This commit is contained in:
parent
e8874e08eb
commit
3f1a4576dd
2 changed files with 25 additions and 19 deletions
|
@ -31,24 +31,18 @@ add_custom_command(
|
||||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff.dyn
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff.dyn
|
||||||
)
|
)
|
||||||
|
|
||||||
# And now we build reactos.cab
|
# And now we build reactos.inf
|
||||||
|
|
||||||
# First we create reactos.inf
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf
|
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}
|
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)
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff native-cabman)
|
||||||
|
|
||||||
# Then we create the actual cab file using a custom target
|
# reactos.cab generation will be made later (cf. CMakeMacros.cmake - create iso lists)
|
||||||
add_custom_command(
|
add_custom_target(reactos_cab_inf DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf)
|
||||||
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)
|
|
||||||
|
|
||||||
add_cd_file(
|
add_cd_file(
|
||||||
TARGET reactos_cab
|
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
|
DESTINATION reactos
|
||||||
NO_CAB FOR bootcd regtest)
|
NO_CAB FOR bootcd regtest)
|
||||||
|
|
||||||
|
|
|
@ -316,15 +316,11 @@ function(add_cd_file)
|
||||||
file(APPEND ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff.dyn "\"${__relative_file}\" ${_num}\n")
|
file(APPEND ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff.dyn "\"${__relative_file}\" ${_num}\n")
|
||||||
unset(__relative_file)
|
unset(__relative_file)
|
||||||
if(_CD_TARGET)
|
if(_CD_TARGET)
|
||||||
#manage dependency
|
#manage dependency - target level
|
||||||
add_dependencies(reactos_cab ${_CD_TARGET})
|
add_dependencies(reactos_cab_inf ${_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()
|
|
||||||
endif()
|
endif()
|
||||||
|
# manage dependency - file level
|
||||||
|
set_property(GLOBAL APPEND PROPERTY REACTOS_CAB_DEPENDS ${_CD_FILE})
|
||||||
endif()
|
endif()
|
||||||
endif() #end bootcd
|
endif() #end bootcd
|
||||||
|
|
||||||
|
@ -378,6 +374,22 @@ function(add_cd_file)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(create_iso_lists)
|
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)
|
get_property(_filelist GLOBAL PROPERTY BOOTCD_FILE_LIST)
|
||||||
string(REPLACE ";" "\n" _filelist "${_filelist}")
|
string(REPLACE ";" "\n" _filelist "${_filelist}")
|
||||||
file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcd.lst "${_filelist}")
|
file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcd.lst "${_filelist}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue