[FREELDR]
[reactos.git] / reactos / boot / freeldr / freeldr / CMakeLists.txt
index 52cbdf2..23c114c 100644 (file)
@@ -33,14 +33,17 @@ endif()
 
 list(APPEND FREELDR_COMMON_SOURCE
     include/freeldr.h
+    arcname.c
     cmdline.c
+    custom.c
     debug.c
     linuxboot.c
+    miscboot.c
     machine.c
     options.c
     oslist.c
     version.c
-    arcemul/time.c
+    arch/archwsup.c
     cache/blocklist.c
     cache/cache.c
     comm/rs232.c
@@ -59,9 +62,6 @@ list(APPEND FREELDR_COMMON_SOURCE
     mm/meminit.c
     mm/mm.c
     mm/heap.c
-    reactos/registry.c
-    reactos/arcname.c
-    reactos/archwsup.c
     ui/directui.c
     ui/gui.c
     ui/minitui.c
@@ -74,6 +74,7 @@ list(APPEND FREELDR_COMMON_SOURCE
     video/video.c
     windows/conversion.c
     windows/peloader.c
+    windows/registry.c
     windows/winldr.c
     windows/wlmemory.c
     windows/wlregistry.c)
@@ -88,7 +89,6 @@ if(ARCH STREQUAL "i386")
     list(APPEND FREELDR_COMMON_SOURCE
         fs/pxe.c
         arch/i386/archmach.c
-        arch/i386/custom.c
         arch/i386/drivemap.c
         arch/i386/halstub.c
         arch/i386/hardware.c
@@ -102,7 +102,6 @@ if(ARCH STREQUAL "i386")
         arch/i386/i386rtl.c
         arch/i386/i386vid.c
         arch/i386/machpc.c
-        arch/i386/miscboot.c
         arch/i386/ntoskrnl.c
         arch/i386/pccons.c
         arch/i386/pcdisk.c
@@ -131,7 +130,6 @@ elseif(ARCH STREQUAL "amd64")
         arch/amd64/pnpbios.S)
     list(APPEND FREELDR_COMMON_SOURCE
         fs/pxe.c
-        arch/i386/custom.c
         arch/i386/drivemap.c
         arch/i386/hardware.c
         arch/i386/hwacpi.c
@@ -228,21 +226,25 @@ endif()
 add_dependencies(freeldr_pe asm)
 add_dependencies(freeldr_pe_dbg asm)
 
+# Retrieve the full path to the generated file of the 'freeldr_pe' target
+get_target_property(_freeldr_pe_output_file freeldr_pe LOCATION)
+
 concatenate_files(
+    ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys
     ${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin
-    freeldr_pe
-    ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys)
+    ${_freeldr_pe_output_file})
 
 add_custom_target(freeldr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys)
 
 # rename freeldr on livecd to setupldr.sys because isoboot.bin looks for setupldr.sys
 add_cd_file(TARGET freeldr FILE ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys DESTINATION loader NO_CAB FOR bootcd regtest)
-add_cd_file(TARGET freeldr FILE ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys DESTINATION loader NO_CAB FOR livecd NAME_ON_CD setupldr.sys)
+add_cd_file(TARGET freeldr FILE ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys DESTINATION loader NO_CAB NOT_IN_HYBRIDCD FOR livecd hybridcd NAME_ON_CD setupldr.sys)
 
 concatenate_files(
+    ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys
     ${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin
-    freeldr_pe
-    ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys)
+    ${_freeldr_pe_output_file})
 
 add_custom_target(setupldr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys)
 add_cd_file(TARGET setupldr FILE ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys DESTINATION loader NO_CAB FOR bootcd regtest)
+