Files
dmex 2521ec49d6 CustomBuildTool: Add CMake SDK linking, vcvars fix, and -cmake flag
CMake: set ARCHIVE_OUTPUT_DIRECTORY for targets and add SDK/thirdparty linking for plugin targets; expose SI_PLATFORM_SDK_LIB for platform-specific SDK lib paths. Tools: pass a -cmake flag from si_sdkbuild and handle -cmake in CustomBuildTool. CustomBuildTool: only show build stats when verbose and improve ExecuteCMakeCommand vcvarsall detection by preferring VCINSTALLDIR, falling back to a VS instance, and returning an error if vcvarsall is not found. Zip: simplify compression column output and mark the file parameter as unused.
2026-02-23 16:59:44 +11:00

32 lines
911 B
CMake

#
# Copyright (c) 2022 Winsider Seminars & Solutions, Inc. All rights reserved.
#
# This file is part of System Informer.
#
set(SI_CUSTOM_BUILD_TOOL "${SI_ROOT}/tools/CustomBuildTool/bin/Release/$ENV{PROCESSOR_ARCHITECTURE}/CustomBuildTool.exe")
if (NOT EXISTS "${SI_CUSTOM_BUILD_TOOL}")
message(FATAL_ERROR "CustomBuildTool.exe not found. Run build\\build_tools.cmd first.")
endif()
function(si_sdkbuild target)
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND "${SI_CUSTOM_BUILD_TOOL}" -sdk -$<CONFIG> -${SI_PLATFORM} -cmake
WORKING_DIRECTORY "${SI_ROOT}"
VERBATIM
)
endfunction()
function(si_kphsign target)
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND "${SI_CUSTOM_BUILD_TOOL}" -kphsign "$<SHELL_PATH:$<TARGET_FILE:${target}>>"
WORKING_DIRECTORY "${SI_ROOT}"
VERBATIM
)
endfunction()