Author: spetreolle
Date: Sat Jan 8 23:25:58 2011
New Revision: 50338
URL:
http://svn.reactos.org/svn/reactos?rev=50338&view=rev
Log:
[CMAKE]
Get a proper bootcd for unix builds (3rd stage.)
Thanks to Amine for his findings.
Modified:
branches/cmake-bringup/ros_cd.cmake
Modified: branches/cmake-bringup/ros_cd.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ros_cd.cmake?rev=…
==============================================================================
--- branches/cmake-bringup/ros_cd.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/ros_cd.cmake [iso-8859-1] Sat Jan 8 23:25:58 2011
@@ -9,6 +9,9 @@
string(REGEX REPLACE "^(.*)\t.*" "\\1" _targetname ${ENTRY})
string(REGEX REPLACE "^.*\t(.)" "\\1" _dir_num ${ENTRY})
get_target_property(_FILENAME ${_targetname} LOCATION)
+ if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
+ set(_FILENAME '\"${_FILENAME}\"')
+ endif()
add_custom_command(
OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.dff
COMMAND ${CMAKE_COMMAND} -E echo ${_FILENAME} ${_dir_num} >>
${REACTOS_BINARY_DIR}/boot/reactos.dff
@@ -20,9 +23,14 @@
foreach(ENTRY ${CAB_TARGET_ENTRIES})
string(REGEX REPLACE "^(.*)\t.*" "\\1" _FILENAME ${ENTRY})
string(REGEX REPLACE "^.*\t(.)" "\\1" _dir_num ${ENTRY})
- add_custom_command(
+ if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
+ set(QUOTED_FILENAME '\"${_FILENAME}\"')
+ else()
+ set(QUOTED_FILENAME ${_FILENAME})
+ endif()
+ add_custom_command(
OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.dff
- COMMAND ${CMAKE_COMMAND} -E echo ${_FILENAME} ${_dir_num} >>
${REACTOS_BINARY_DIR}/boot/reactos.dff
+ COMMAND ${CMAKE_COMMAND} -E echo ${QUOTED_FILENAME} ${_dir_num} >>
${REACTOS_BINARY_DIR}/boot/reactos.dff
DEPENDS ${_FILENAME}
APPEND)
endforeach()
@@ -30,11 +38,11 @@
#reactos.cab
add_custom_command(
OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.inf
- COMMAND native-cabman -C ${REACTOS_BINARY_DIR}/boot/reactos.dff -L
${REACTOS_BINARY_DIR}/boot -I
+ COMMAND native-cabman -C ${REACTOS_BINARY_DIR}/boot/reactos.dff -L
${REACTOS_BINARY_DIR}/boot -I -P ${REACTOS_SOURCE_DIR}
DEPENDS ${REACTOS_BINARY_DIR}/boot/reactos.dff)
add_custom_command(
OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.cab
- COMMAND native-cabman -C ${REACTOS_BINARY_DIR}/boot/reactos.dff -RC
${REACTOS_BINARY_DIR}/boot/reactos.inf -L ${REACTOS_BINARY_DIR}/boot -N
+ COMMAND native-cabman -C ${REACTOS_BINARY_DIR}/boot/reactos.dff -RC
${REACTOS_BINARY_DIR}/boot/reactos.inf -L ${REACTOS_BINARY_DIR}/boot -N -P
${REACTOS_SOURCE_DIR}
DEPENDS ${REACTOS_BINARY_DIR}/boot/reactos.inf)
#bootcd target
@@ -148,4 +156,4 @@
DEPENDS ${LIVECD_FILES})
add_dependencies(livecd isoboot livecd_hives vgafonts)
-set_directory_properties(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
${REACTOS_BINARY_DIR}/livecd.iso)
+set_directory_properties(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
${REACTOS_BINARY_DIR}/livecd.iso)