2011-05-16 13:12:07 +00:00
|
|
|
#reactos.dff
|
|
|
|
|
2018-03-30 11:03:17 +00:00
|
|
|
# reactos.dff is the concatenation of two files:
|
|
|
|
# - reactos.dff.in, which is a static one and can be altered to
|
|
|
|
# add custom modules/files to reactos.cab
|
|
|
|
# - reactos.dff.dyn (dyn as in dynamic) which is generated at generation
|
|
|
|
# time by our cmake scripts (from reactos.dff.cmake, which contains
|
|
|
|
# generator expressions)
|
2011-05-16 13:12:07 +00:00
|
|
|
# If you want to slip-stream anything into the bootcd, then you want to alter reactos.dff.in
|
|
|
|
|
|
|
|
# Idea taken from there : http://www.cmake.org/pipermail/cmake/2010-July/038028.html
|
|
|
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/concat.cmake "
|
|
|
|
file(READ \${SRC1} S1)
|
|
|
|
file(READ \${SRC2} S2)
|
|
|
|
file(WRITE \${DST} \"\${S1}\${S2}\")
|
|
|
|
")
|
|
|
|
|
2018-03-30 11:03:17 +00:00
|
|
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff.cmake "")
|
|
|
|
|
|
|
|
# This generates reactos.dff.dyn by processing the generator expressions
|
|
|
|
file(GENERATE
|
2018-04-08 16:31:27 +00:00
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff.$<CONFIG>.dyn
|
2018-03-30 11:03:17 +00:00
|
|
|
INPUT ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff.cmake)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
2014-08-07 18:20:46 +00:00
|
|
|
# This finalizes reactos.dff by concat-ing the two files: one generated and one static containing the optional file.
|
|
|
|
# please keep it this way as it permits to add files to reactos.dff.in without having to run cmake again
|
|
|
|
# and also avoids rebuilding reactos.cab in case nothing changes after a cmake run
|
2011-05-16 13:12:07 +00:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff
|
|
|
|
COMMAND ${CMAKE_COMMAND} -D SRC1=${CMAKE_CURRENT_SOURCE_DIR}/reactos.dff.in
|
2018-04-08 16:31:27 +00:00
|
|
|
-D SRC2=${CMAKE_CURRENT_BINARY_DIR}/reactos.dff.$<CONFIG>.dyn
|
2014-08-07 18:20:46 +00:00
|
|
|
-D DST=${CMAKE_CURRENT_BINARY_DIR}/reactos.dff.maydiff
|
2011-05-16 13:12:07 +00:00
|
|
|
-P ${CMAKE_CURRENT_BINARY_DIR}/concat.cmake
|
2014-08-07 18:20:46 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/reactos.dff.maydiff
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/reactos.dff
|
2011-05-16 13:12:07 +00:00
|
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/reactos.dff.in
|
2018-04-08 16:31:27 +00:00
|
|
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff.$<CONFIG>.dyn)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
2014-08-23 14:40:00 +00:00
|
|
|
add_custom_target(
|
|
|
|
reactos_cab_inf
|
2011-05-16 13:12:07 +00:00
|
|
|
COMMAND native-cabman -C ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff -L ${CMAKE_CURRENT_BINARY_DIR} -I -P ${REACTOS_SOURCE_DIR}
|
2011-08-07 00:53:19 +00:00
|
|
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.dff native-cabman)
|
2011-05-28 22:03:07 +00:00
|
|
|
|
2014-08-07 18:20:46 +00:00
|
|
|
add_cd_file(
|
2014-08-23 14:40:00 +00:00
|
|
|
TARGET reactos_cab_inf
|
2014-08-13 16:30:52 +00:00
|
|
|
FILE ${CMAKE_CURRENT_BINARY_DIR}/reactos.inf
|
2014-08-07 18:20:46 +00:00
|
|
|
DESTINATION reactos
|
|
|
|
NO_CAB FOR bootcd regtest)
|