mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 10:23:17 +00:00

Set UTF-8 as the default code page on the manifest This is available since Windows 1903 but backwards compatible. https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page Add manifest to other binaries --------- Signed-off-by: Sophie0x2E <219585213+Sophie0x2E@users.noreply.github.com>
48 lines
1.4 KiB
CMake
48 lines
1.4 KiB
CMake
# Copyright (C) 2020-2025 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
|
|
|
|
if(WIN32)
|
|
add_definitions(-DWIN32_LEAN_AND_MEAN)
|
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
|
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
|
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
|
|
|
|
# Windows compatibility headers
|
|
include_directories(${CMAKE_SOURCE_DIR}/win32/compat)
|
|
endif()
|
|
|
|
# The sigtool executable.
|
|
add_executable( sigtool )
|
|
target_sources( sigtool
|
|
PRIVATE
|
|
sigtool.c
|
|
vba.c
|
|
vba.h )
|
|
if(WIN32)
|
|
target_sources( sigtool PRIVATE
|
|
${CMAKE_SOURCE_DIR}/win32/res/sigtool.rc
|
|
${CMAKE_SOURCE_DIR}/win32/res/clam.manifest )
|
|
endif()
|
|
target_include_directories( sigtool
|
|
PRIVATE
|
|
${CMAKE_BINARY_DIR} # For clamav-config.h
|
|
)
|
|
|
|
set_target_properties( sigtool PROPERTIES COMPILE_FLAGS "${WARNCFLAGS}" )
|
|
|
|
if (APPLE AND CLAMAV_SIGN_FILE)
|
|
set_target_properties( sigtool PROPERTIES
|
|
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ${CODE_SIGN_IDENTITY}
|
|
XCODE_ATTRIBUTE_DEVELOPMENT_TEAM ${DEVELOPMENT_TEAM_ID}
|
|
)
|
|
endif()
|
|
|
|
target_link_libraries( sigtool
|
|
PRIVATE
|
|
ClamAV::libclamav
|
|
ClamAV::common )
|
|
if(WIN32)
|
|
install(TARGETS sigtool DESTINATION . COMPONENT programs)
|
|
install(FILES $<TARGET_PDB_FILE:sigtool> DESTINATION . OPTIONAL COMPONENT programs)
|
|
else()
|
|
install(TARGETS sigtool DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT programs)
|
|
endif()
|