cmake: Add AddWindowsResources module

This commit is contained in:
Hennadii Stepanov
2024-01-27 12:03:58 +00:00
parent 973a3b0c5d
commit 2b43c45b13
3 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# Copyright (c) 2024-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/license/mit/.
include_guard(GLOBAL)
macro(add_windows_resources target rc_file)
if(WIN32)
target_sources(${target} PRIVATE ${rc_file})
set_property(SOURCE ${rc_file}
APPEND PROPERTY COMPILE_DEFINITIONS WINDRES_PREPROC
)
endif()
endmacro()