Author: akhaldi
Date: Sat May 28 22:03:07 2011
New Revision: 51987
URL:
http://svn.reactos.org/svn/reactos?rev=51987&view=rev
Log:
[CMAKE]
* Improve reactos.cab creation a bit: create it using a custom command instead of a custom
target.. marking it as output this way ensures a proper cleanup with make clean and co.
Modified:
trunk/reactos/boot/bootdata/packages/CMakeLists.txt
Modified: trunk/reactos/boot/bootdata/packages/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/CMa…
==============================================================================
--- trunk/reactos/boot/bootdata/packages/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/boot/bootdata/packages/CMakeLists.txt [iso-8859-1] Sat May 28 22:03:07
2011
@@ -26,20 +26,22 @@
)
# And now we build reactos.cab
+
+# First we create 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
)
-# 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
-# )
-add_custom_target(reactos_cab
- 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}
+# Then we create the actual cab file
+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
- VERBATIM)
+)
+
+# Finally, we create the reactos_cab target
+add_custom_target(reactos_cab ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/reactos.cab)
add_cd_file(TARGET reactos_cab FILE ${CMAKE_CURRENT_BINARY_DIR}/reactos.cab
${CMAKE_CURRENT_BINARY_DIR}/reactos.inf DESTINATION reactos NO_CAB FOR bootcd regtest)