mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 21:11:54 +00:00
[CMAKE]: Fix the dependencies for the hybridcd.
svn path=/trunk/; revision=73654
This commit is contained in:
parent
103ff5a0b0
commit
229958ea1d
1 changed files with 25 additions and 21 deletions
|
@ -290,49 +290,49 @@ function(add_cd_file)
|
||||||
message(FATAL_ERROR "You must provide a cd name (or \"all\" for all of them) to install the file on!")
|
message(FATAL_ERROR "You must provide a cd name (or \"all\" for all of them) to install the file on!")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#get file if we need to
|
# get file if we need to
|
||||||
if(NOT _CD_FILE)
|
if(NOT _CD_FILE)
|
||||||
get_target_property(_CD_FILE ${_CD_TARGET} LOCATION_${CMAKE_BUILD_TYPE})
|
get_target_property(_CD_FILE ${_CD_TARGET} LOCATION_${CMAKE_BUILD_TYPE})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#do we add it to all CDs?
|
# do we add it to all CDs?
|
||||||
list(FIND _CD_FOR all __cd)
|
list(FIND _CD_FOR all __cd)
|
||||||
if(NOT __cd EQUAL -1)
|
if(NOT __cd EQUAL -1)
|
||||||
list(REMOVE_AT _CD_FOR __cd)
|
list(REMOVE_AT _CD_FOR __cd)
|
||||||
list(INSERT _CD_FOR __cd "bootcd;livecd;regtest")
|
list(INSERT _CD_FOR __cd "bootcd;livecd;regtest")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#do we add it to bootcd?
|
# do we add it to bootcd?
|
||||||
list(FIND _CD_FOR bootcd __cd)
|
list(FIND _CD_FOR bootcd __cd)
|
||||||
if(NOT __cd EQUAL -1)
|
if(NOT __cd EQUAL -1)
|
||||||
#whether or not we should put it in reactos.cab or directly on cd
|
# whether or not we should put it in reactos.cab or directly on cd
|
||||||
if(_CD_NO_CAB)
|
if(_CD_NO_CAB)
|
||||||
#directly on cd
|
# directly on cd
|
||||||
foreach(item ${_CD_FILE})
|
foreach(item ${_CD_FILE})
|
||||||
if(_CD_NAME_ON_CD)
|
if(_CD_NAME_ON_CD)
|
||||||
#rename it in the cd tree
|
# rename it in the cd tree
|
||||||
set(__file ${_CD_NAME_ON_CD})
|
set(__file ${_CD_NAME_ON_CD})
|
||||||
else()
|
else()
|
||||||
get_filename_component(__file ${item} NAME)
|
get_filename_component(__file ${item} NAME)
|
||||||
endif()
|
endif()
|
||||||
set_property(GLOBAL APPEND PROPERTY BOOTCD_FILE_LIST "${_CD_DESTINATION}/${__file}=${item}")
|
set_property(GLOBAL APPEND PROPERTY BOOTCD_FILE_LIST "${_CD_DESTINATION}/${__file}=${item}")
|
||||||
#add it also into the hybridcd if not specified otherwise
|
# add it also into the hybridcd if not specified otherwise
|
||||||
if(NOT _CD_NOT_IN_HYBRIDCD)
|
if(NOT _CD_NOT_IN_HYBRIDCD)
|
||||||
set_property(GLOBAL APPEND PROPERTY HYBRIDCD_FILE_LIST "bootcd/${_CD_DESTINATION}/${__file}=${item}")
|
set_property(GLOBAL APPEND PROPERTY HYBRIDCD_FILE_LIST "bootcd/${_CD_DESTINATION}/${__file}=${item}")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
# manage dependency
|
||||||
if(_CD_TARGET)
|
if(_CD_TARGET)
|
||||||
#manage dependency
|
|
||||||
add_dependencies(bootcd ${_CD_TARGET} registry_inf)
|
add_dependencies(bootcd ${_CD_TARGET} registry_inf)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
#add it in reactos.cab
|
# add it in reactos.cab
|
||||||
dir_to_num(${_CD_DESTINATION} _num)
|
dir_to_num(${_CD_DESTINATION} _num)
|
||||||
file(RELATIVE_PATH __relative_file ${REACTOS_SOURCE_DIR} ${_CD_FILE})
|
file(RELATIVE_PATH __relative_file ${REACTOS_SOURCE_DIR} ${_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)
|
||||||
|
# manage dependency - target level
|
||||||
if(_CD_TARGET)
|
if(_CD_TARGET)
|
||||||
#manage dependency - target level
|
|
||||||
add_dependencies(reactos_cab_inf ${_CD_TARGET})
|
add_dependencies(reactos_cab_inf ${_CD_TARGET})
|
||||||
endif()
|
endif()
|
||||||
# manage dependency - file level
|
# manage dependency - file level
|
||||||
|
@ -340,34 +340,38 @@ function(add_cd_file)
|
||||||
endif()
|
endif()
|
||||||
endif() #end bootcd
|
endif() #end bootcd
|
||||||
|
|
||||||
#do we add it to livecd?
|
# do we add it to livecd?
|
||||||
list(FIND _CD_FOR livecd __cd)
|
list(FIND _CD_FOR livecd __cd)
|
||||||
if(NOT __cd EQUAL -1)
|
if(NOT __cd EQUAL -1)
|
||||||
#manage dependency
|
# manage dependency
|
||||||
if(_CD_TARGET)
|
if(_CD_TARGET)
|
||||||
add_dependencies(livecd ${_CD_TARGET} registry_inf)
|
add_dependencies(livecd ${_CD_TARGET} registry_inf)
|
||||||
endif()
|
endif()
|
||||||
foreach(item ${_CD_FILE})
|
foreach(item ${_CD_FILE})
|
||||||
if(_CD_NAME_ON_CD)
|
if(_CD_NAME_ON_CD)
|
||||||
#rename it in the cd tree
|
# rename it in the cd tree
|
||||||
set(__file ${_CD_NAME_ON_CD})
|
set(__file ${_CD_NAME_ON_CD})
|
||||||
else()
|
else()
|
||||||
get_filename_component(__file ${item} NAME)
|
get_filename_component(__file ${item} NAME)
|
||||||
endif()
|
endif()
|
||||||
set_property(GLOBAL APPEND PROPERTY LIVECD_FILE_LIST "${_CD_DESTINATION}/${__file}=${item}")
|
set_property(GLOBAL APPEND PROPERTY LIVECD_FILE_LIST "${_CD_DESTINATION}/${__file}=${item}")
|
||||||
#add it also into the hybridcd if not specified otherwise
|
# add it also into the hybridcd if not specified otherwise
|
||||||
if(NOT _CD_NOT_IN_HYBRIDCD)
|
if(NOT _CD_NOT_IN_HYBRIDCD)
|
||||||
set_property(GLOBAL APPEND PROPERTY HYBRIDCD_FILE_LIST "livecd/${_CD_DESTINATION}/${__file}=${item}")
|
set_property(GLOBAL APPEND PROPERTY HYBRIDCD_FILE_LIST "livecd/${_CD_DESTINATION}/${__file}=${item}")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
endif() #end livecd
|
endif() #end livecd
|
||||||
|
|
||||||
#do we need also to add it to hybridcd?
|
# do we need also to add it to hybridcd?
|
||||||
list(FIND _CD_FOR hybridcd __cd)
|
list(FIND _CD_FOR hybridcd __cd)
|
||||||
if(NOT __cd EQUAL -1)
|
if(NOT __cd EQUAL -1)
|
||||||
|
# manage dependency
|
||||||
|
if(_CD_TARGET)
|
||||||
|
add_dependencies(hybridcd ${_CD_TARGET})
|
||||||
|
endif()
|
||||||
foreach(item ${_CD_FILE})
|
foreach(item ${_CD_FILE})
|
||||||
if(_CD_NAME_ON_CD)
|
if(_CD_NAME_ON_CD)
|
||||||
#rename it in the cd tree
|
# rename it in the cd tree
|
||||||
set(__file ${_CD_NAME_ON_CD})
|
set(__file ${_CD_NAME_ON_CD})
|
||||||
else()
|
else()
|
||||||
get_filename_component(__file ${item} NAME)
|
get_filename_component(__file ${item} NAME)
|
||||||
|
@ -376,23 +380,23 @@ function(add_cd_file)
|
||||||
endforeach()
|
endforeach()
|
||||||
endif() #end hybridcd
|
endif() #end hybridcd
|
||||||
|
|
||||||
#do we add it to regtest?
|
# do we add it to regtest?
|
||||||
list(FIND _CD_FOR regtest __cd)
|
list(FIND _CD_FOR regtest __cd)
|
||||||
if(NOT __cd EQUAL -1)
|
if(NOT __cd EQUAL -1)
|
||||||
#whether or not we should put it in reactos.cab or directly on cd
|
# whether or not we should put it in reactos.cab or directly on cd
|
||||||
if(_CD_NO_CAB)
|
if(_CD_NO_CAB)
|
||||||
#directly on cd
|
# directly on cd
|
||||||
foreach(item ${_CD_FILE})
|
foreach(item ${_CD_FILE})
|
||||||
if(_CD_NAME_ON_CD)
|
if(_CD_NAME_ON_CD)
|
||||||
#rename it in the cd tree
|
# rename it in the cd tree
|
||||||
set(__file ${_CD_NAME_ON_CD})
|
set(__file ${_CD_NAME_ON_CD})
|
||||||
else()
|
else()
|
||||||
get_filename_component(__file ${item} NAME)
|
get_filename_component(__file ${item} NAME)
|
||||||
endif()
|
endif()
|
||||||
set_property(GLOBAL APPEND PROPERTY BOOTCDREGTEST_FILE_LIST "${_CD_DESTINATION}/${__file}=${item}")
|
set_property(GLOBAL APPEND PROPERTY BOOTCDREGTEST_FILE_LIST "${_CD_DESTINATION}/${__file}=${item}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
# manage dependency
|
||||||
if(_CD_TARGET)
|
if(_CD_TARGET)
|
||||||
#manage dependency
|
|
||||||
add_dependencies(bootcdregtest ${_CD_TARGET} registry_inf)
|
add_dependencies(bootcdregtest ${_CD_TARGET} registry_inf)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue