mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[CMAKE] Get rid of add_object_library
It's not needed anymore
This commit is contained in:
parent
93d741c3f4
commit
49286a6225
10 changed files with 16 additions and 56 deletions
|
@ -15,30 +15,12 @@ function(add_hal _halname)
|
||||||
spec2def(${_halname}.dll ../hal.spec ADD_IMPORTLIB)
|
spec2def(${_halname}.dll ../hal.spec ADD_IMPORTLIB)
|
||||||
|
|
||||||
# Create the actual target
|
# Create the actual target
|
||||||
if(NOT MSVC)
|
|
||||||
foreach(_component ${_haldata_COMPONENTS})
|
foreach(_component ${_haldata_COMPONENTS})
|
||||||
list(APPEND _haldata_SOURCES "$<TARGET_OBJECTS:lib_hal_${_component}>")
|
list(APPEND _haldata_SOURCES "$<TARGET_OBJECTS:lib_hal_${_component}>")
|
||||||
endforeach()
|
endforeach()
|
||||||
add_library(${_halname} MODULE
|
add_library(${_halname} MODULE
|
||||||
${_haldata_SOURCES}
|
${_haldata_SOURCES}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/hal.def)
|
${CMAKE_CURRENT_BINARY_DIR}/hal.def)
|
||||||
else()
|
|
||||||
foreach(_component ${_haldata_COMPONENTS})
|
|
||||||
list(APPEND _haldata_LIBS "lib_hal_${_component}")
|
|
||||||
endforeach()
|
|
||||||
add_library(${_halname} MODULE
|
|
||||||
${_haldata_SOURCES}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/hal.def)
|
|
||||||
target_link_libraries(${_halname} ${_haldata_LIBS})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(${_halname} STREQUAL "halpc98")
|
|
||||||
target_compile_definitions(lib_hal_pc98 PRIVATE SARCH_PC98)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(${_halname} STREQUAL "halxbox")
|
|
||||||
target_compile_definitions(lib_hal_xbox PRIVATE SARCH_XBOX)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(${_halname} STREQUAL "hal")
|
if(${_halname} STREQUAL "hal")
|
||||||
target_link_libraries(${_halname} libcntpr arbiter)
|
target_link_libraries(${_halname} libcntpr arbiter)
|
||||||
|
|
|
@ -5,10 +5,7 @@ list(APPEND HAL_ACPI_SOURCE
|
||||||
acpi/busemul.c
|
acpi/busemul.c
|
||||||
legacy/bus/pcibus.c)
|
legacy/bus/pcibus.c)
|
||||||
|
|
||||||
add_object_library(lib_hal_acpi ${HAL_ACPI_SOURCE})
|
add_library(lib_hal_acpi OBJECT ${HAL_ACPI_SOURCE})
|
||||||
add_dependencies(lib_hal_acpi bugcodes xdk)
|
add_dependencies(lib_hal_acpi bugcodes xdk)
|
||||||
#add_pch(lib_hal_acpi include/hal.h)
|
#add_pch(lib_hal_acpi include/hal.h)
|
||||||
|
|
||||||
if(MSVC)
|
|
||||||
target_link_libraries(lib_hal_acpi lib_hal_generic)
|
|
||||||
endif()
|
|
||||||
|
|
|
@ -11,5 +11,5 @@ list(APPEND HAL_APIC_SOURCE
|
||||||
apic/tsc.c)
|
apic/tsc.c)
|
||||||
|
|
||||||
add_asm_files(lib_hal_apic_asm ${HAL_APIC_ASM_SOURCE})
|
add_asm_files(lib_hal_apic_asm ${HAL_APIC_ASM_SOURCE})
|
||||||
add_object_library(lib_hal_apic ${HAL_APIC_SOURCE} ${lib_hal_apic_asm})
|
add_library(lib_hal_apic OBJECT ${HAL_APIC_SOURCE} ${lib_hal_apic_asm})
|
||||||
add_dependencies(lib_hal_apic asm)
|
add_dependencies(lib_hal_apic asm)
|
||||||
|
|
|
@ -24,5 +24,5 @@ if(ARCH STREQUAL "i386")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_asm_files(lib_hal_generic_asm ${HAL_GENERIC_ASM_SOURCE})
|
add_asm_files(lib_hal_generic_asm ${HAL_GENERIC_ASM_SOURCE})
|
||||||
add_object_library(lib_hal_generic ${HAL_GENERIC_SOURCE} ${lib_hal_generic_asm})
|
add_library(lib_hal_generic OBJECT ${HAL_GENERIC_SOURCE} ${lib_hal_generic_asm})
|
||||||
add_dependencies(lib_hal_generic asm)
|
add_dependencies(lib_hal_generic asm)
|
||||||
|
|
|
@ -11,10 +11,6 @@ list(APPEND HAL_LEGACY_SOURCE
|
||||||
legacy/halpnpdd.c
|
legacy/halpnpdd.c
|
||||||
legacy/halpcat.c)
|
legacy/halpcat.c)
|
||||||
|
|
||||||
add_object_library(lib_hal_legacy ${HAL_LEGACY_SOURCE})
|
add_library(lib_hal_legacy OBJECT ${HAL_LEGACY_SOURCE})
|
||||||
add_dependencies(lib_hal_legacy bugcodes xdk)
|
add_dependencies(lib_hal_legacy bugcodes xdk)
|
||||||
#add_pch(lib_hal_legacy include/hal.h)
|
#add_pch(lib_hal_legacy include/hal.h)
|
||||||
|
|
||||||
if(MSVC)
|
|
||||||
target_link_libraries(lib_hal_legacy lib_hal_generic)
|
|
||||||
endif()
|
|
||||||
|
|
|
@ -48,10 +48,8 @@ list(APPEND HAL_PC98_SOURCE
|
||||||
legacy/halpcat.c)
|
legacy/halpcat.c)
|
||||||
|
|
||||||
add_asm_files(lib_hal_pc98_asm ${HAL_PC98_ASM_SOURCE})
|
add_asm_files(lib_hal_pc98_asm ${HAL_PC98_ASM_SOURCE})
|
||||||
add_object_library(lib_hal_pc98 ${HAL_PC98_SOURCE} ${lib_hal_pc98_asm})
|
add_library(lib_hal_pc98 OBJECT ${HAL_PC98_SOURCE} ${lib_hal_pc98_asm})
|
||||||
add_dependencies(lib_hal_pc98 bugcodes xdk asm)
|
add_dependencies(lib_hal_pc98 bugcodes xdk asm)
|
||||||
#add_pch(lib_hal_pc98 pc98/halpc98.h)
|
#add_pch(lib_hal_pc98 pc98/halpc98.h)
|
||||||
|
|
||||||
if(MSVC)
|
target_compile_definitions(lib_hal_pc98 PRIVATE SARCH_PC98)
|
||||||
target_link_libraries(lib_hal_pc98)
|
|
||||||
endif()
|
|
||||||
|
|
|
@ -13,5 +13,5 @@ list(APPEND HAL_PIC_SOURCE
|
||||||
up/pic.c)
|
up/pic.c)
|
||||||
|
|
||||||
add_asm_files(lib_hal_pic_asm ${HAL_PIC_ASM_SOURCE})
|
add_asm_files(lib_hal_pic_asm ${HAL_PIC_ASM_SOURCE})
|
||||||
add_object_library(lib_hal_pic ${HAL_PIC_SOURCE} ${lib_hal_pic_asm})
|
add_library(lib_hal_pic OBJECT ${HAL_PIC_SOURCE} ${lib_hal_pic_asm})
|
||||||
add_dependencies(lib_hal_pic asm)
|
add_dependencies(lib_hal_pic asm)
|
||||||
|
|
|
@ -3,5 +3,5 @@ list(APPEND HAL_UP_SOURCE
|
||||||
generic/spinlock.c
|
generic/spinlock.c
|
||||||
up/processor.c)
|
up/processor.c)
|
||||||
|
|
||||||
add_object_library(lib_hal_up ${HAL_UP_SOURCE})
|
add_library(lib_hal_up OBJECT ${HAL_UP_SOURCE})
|
||||||
add_dependencies(lib_hal_up bugcodes xdk)
|
add_dependencies(lib_hal_up bugcodes xdk)
|
||||||
|
|
|
@ -40,10 +40,7 @@ list(APPEND HAL_XBOX_SOURCE
|
||||||
up/pic.c)
|
up/pic.c)
|
||||||
|
|
||||||
add_asm_files(lib_hal_xbox_asm ${HAL_XBOX_ASM_SOURCE})
|
add_asm_files(lib_hal_xbox_asm ${HAL_XBOX_ASM_SOURCE})
|
||||||
add_object_library(lib_hal_xbox ${HAL_XBOX_SOURCE} ${lib_hal_xbox_asm})
|
add_library(lib_hal_xbox OBJECT ${HAL_XBOX_SOURCE} ${lib_hal_xbox_asm})
|
||||||
add_dependencies(lib_hal_xbox bugcodes xdk asm)
|
add_dependencies(lib_hal_xbox bugcodes xdk asm)
|
||||||
#add_pch(lib_hal_xbox xbox/halxbox.h)
|
#add_pch(lib_hal_xbox xbox/halxbox.h)
|
||||||
|
target_compile_definitions(lib_hal_xbox PRIVATE SARCH_XBOX)
|
||||||
if(MSVC)
|
|
||||||
target_link_libraries(lib_hal_xbox)
|
|
||||||
endif()
|
|
||||||
|
|
|
@ -717,16 +717,6 @@ function(get_defines OUTPUT_VAR)
|
||||||
set(${OUTPUT_VAR} ${__tmp_var} PARENT_SCOPE)
|
set(${OUTPUT_VAR} ${__tmp_var} PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
if(NOT MSVC)
|
|
||||||
function(add_object_library _target)
|
|
||||||
add_library(${_target} OBJECT ${ARGN})
|
|
||||||
endfunction()
|
|
||||||
else()
|
|
||||||
function(add_object_library _target)
|
|
||||||
add_library(${_target} ${ARGN})
|
|
||||||
endfunction()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
function(add_registry_inf)
|
function(add_registry_inf)
|
||||||
# Add to the inf files list
|
# Add to the inf files list
|
||||||
foreach(_file ${ARGN})
|
foreach(_file ${ARGN})
|
||||||
|
|
Loading…
Reference in a new issue