From 249eff9dc5bb584a527707cf30a9176c70453b86 Mon Sep 17 00:00:00 2001 From: Hlongyu <741114316@qq.com> Date: Sat, 17 Aug 2024 14:25:22 +0800 Subject: [PATCH] fix windows ninja build failed --- src/CMakeLists.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fc85f97..01237d6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,7 +7,7 @@ set_target_properties(hwinfo PROPERTIES OUTPUT_NAME "hwinfo") add_library(hwinfo_static INTERFACE) target_include_directories(hwinfo_static INTERFACE $ $) add_library(hwinfo::hwinfo_static ALIAS hwinfo_static) -set_target_properties(hwinfo_static PROPERTIES OUTPUT_NAME "hwinfo") +set_target_properties(hwinfo_static PROPERTIES OUTPUT_NAME "hwinfo_static") # === Components ======================================================================================================= # ----- BATTERY -------------------------------------------------------------------------------------------------------- @@ -38,7 +38,7 @@ if (HWINFO_BATTERY) target_link_libraries(hwinfo_static INTERFACE hwinfo_battery_static) set_target_properties(hwinfo_battery PROPERTIES OUTPUT_NAME "hwinfo_battery") - set_target_properties(hwinfo_battery_static PROPERTIES OUTPUT_NAME "hwinfo_battery") + set_target_properties(hwinfo_battery_static PROPERTIES OUTPUT_NAME "hwinfo_battery_static") install(TARGETS hwinfo_battery hwinfo_battery_static EXPORT hwinfoTargets @@ -72,7 +72,7 @@ if (HWINFO_CPU) target_link_libraries(hwinfo_static INTERFACE hwinfo_cpu_static) set_target_properties(hwinfo_cpu PROPERTIES OUTPUT_NAME "hwinfo_cpu") - set_target_properties(hwinfo_cpu_static PROPERTIES OUTPUT_NAME "hwinfo_cpu") + set_target_properties(hwinfo_cpu_static PROPERTIES OUTPUT_NAME "hwinfo_cpu_static") install(TARGETS hwinfo_cpu hwinfo_cpu_static EXPORT hwinfoTargets @@ -104,14 +104,14 @@ if (HWINFO_DISK) add_library(hwinfo_disk_static STATIC ${DISK_SRC_FILES}) target_include_directories(hwinfo_disk_static PUBLIC $ $) if(APPLE) - target_link_libraries(hwinfo_disk_static PRIVATE "-framework IOKit" "-framework CoreFoundation") + target_link_libraries(hwinfo_disk_static PRIVATE "-framework IOKit" "-framework CoreFoundation_static") endif() target_link_libraries(hwinfo INTERFACE hwinfo_disk) target_link_libraries(hwinfo_static INTERFACE hwinfo_disk_static) set_target_properties(hwinfo_disk PROPERTIES OUTPUT_NAME "hwinfo_disk") - set_target_properties(hwinfo_disk_static PROPERTIES OUTPUT_NAME "hwinfo_disk") + set_target_properties(hwinfo_disk_static PROPERTIES OUTPUT_NAME "hwinfo_disk_static") install(TARGETS hwinfo_disk hwinfo_disk_static EXPORT hwinfoTargets @@ -159,7 +159,7 @@ if (HWINFO_GPU) target_link_libraries(hwinfo_static INTERFACE hwinfo_gpu_static) set_target_properties(hwinfo_gpu PROPERTIES OUTPUT_NAME "hwinfo_gpu") - set_target_properties(hwinfo_gpu_static PROPERTIES OUTPUT_NAME "hwinfo_gpu") + set_target_properties(hwinfo_gpu_static PROPERTIES OUTPUT_NAME "hwinfo_gpu_static") install(TARGETS hwinfo_gpu hwinfo_gpu_static EXPORT hwinfoTargets @@ -196,7 +196,7 @@ if (HWINFO_MAINBOARD) target_link_libraries(hwinfo_static INTERFACE hwinfo_mainboard_static) set_target_properties(hwinfo_mainboard PROPERTIES OUTPUT_NAME "hwinfo_mainboard") - set_target_properties(hwinfo_mainboard_static PROPERTIES OUTPUT_NAME "hwinfo_mainboard") + set_target_properties(hwinfo_mainboard_static PROPERTIES OUTPUT_NAME "hwinfo_mainboard_static") install(TARGETS hwinfo_mainboard hwinfo_mainboard_static EXPORT hwinfoTargets @@ -230,7 +230,7 @@ if (HWINFO_OS) target_link_libraries(hwinfo_static INTERFACE hwinfo_os_static) set_target_properties(hwinfo_os PROPERTIES OUTPUT_NAME "hwinfo_os") - set_target_properties(hwinfo_os_static PROPERTIES OUTPUT_NAME "hwinfo_os") + set_target_properties(hwinfo_os_static PROPERTIES OUTPUT_NAME "hwinfo_os_static") install(TARGETS hwinfo_os hwinfo_os_static EXPORT hwinfoTargets @@ -264,7 +264,7 @@ if (HWINFO_RAM) target_link_libraries(hwinfo_static INTERFACE hwinfo_ram_static) set_target_properties(hwinfo_ram PROPERTIES OUTPUT_NAME "hwinfo_ram") - set_target_properties(hwinfo_ram_static PROPERTIES OUTPUT_NAME "hwinfo_ram") + set_target_properties(hwinfo_ram_static PROPERTIES OUTPUT_NAME "hwinfo_ram_static") install(TARGETS hwinfo_ram hwinfo_ram_static EXPORT hwinfoTargets