Merge bitcoin/bitcoin#32633: windows: Use predefined RC_INVOKED macro instead of custom one

55f1c2ac8b windows: Use predefined `RC_INVOKED` macro instead of custom one (Hennadii Stepanov)

Pull request description:

  See: https://learn.microsoft.com/en-us/windows/win32/menurc/predefined-macros.

ACKs for top commit:
  hodlinator:
    re-ACK 55f1c2ac8b
  fanquake:
    ACK 55f1c2ac8b

Tree-SHA512: cf18e03d0c2b1cd590e379707fc6d1775f08814f20aa51c0c40b9eac6227f42a6e07ba3e478da7d511ace29782bf964eae3edfeb04bcb1f87596966bdd3a55c9
This commit is contained in:
merge-script
2025-05-29 13:51:08 +01:00
2 changed files with 3 additions and 11 deletions

View File

@@ -7,9 +7,6 @@ include_guard(GLOBAL)
function(add_windows_resources target rc_file) function(add_windows_resources target rc_file)
if(WIN32) if(WIN32)
target_sources(${target} PRIVATE ${rc_file}) target_sources(${target} PRIVATE ${rc_file})
set_property(SOURCE ${rc_file}
APPEND PROPERTY COMPILE_DEFINITIONS WINDRES_PREPROC
)
endif() endif()
endfunction() endfunction()

View File

@@ -17,13 +17,8 @@
//! Copyright string used in Windows .rc files //! Copyright string used in Windows .rc files
#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " " COPYRIGHT_HOLDERS_FINAL #define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " " COPYRIGHT_HOLDERS_FINAL
/** // Windows .rc files include this header, but they cannot cope with real C++ code.
* bitcoind-res.rc includes this file, but it cannot cope with real c++ code. #if !defined(RC_INVOKED)
* WINDRES_PREPROC is defined to indicate that its pre-processor is running.
* Anything other than a define should be guarded below.
*/
#if !defined(WINDRES_PREPROC)
#include <string> #include <string>
#include <vector> #include <vector>
@@ -44,6 +39,6 @@ std::string CopyrightHolders(const std::string& strPrefix);
/** Returns licensing information (for -version) */ /** Returns licensing information (for -version) */
std::string LicenseInfo(); std::string LicenseInfo();
#endif // WINDRES_PREPROC #endif // RC_INVOKED
#endif // BITCOIN_CLIENTVERSION_H #endif // BITCOIN_CLIENTVERSION_H