windows: Use predefined RC_INVOKED macro instead of custom one

This commit is contained in:
Hennadii Stepanov
2025-05-28 20:11:04 +01:00
parent 14c16e8159
commit 55f1c2ac8b
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)
if(WIN32)
target_sources(${target} PRIVATE ${rc_file})
set_property(SOURCE ${rc_file}
APPEND PROPERTY COMPILE_DEFINITIONS WINDRES_PREPROC
)
endif()
endfunction()

View File

@ -17,13 +17,8 @@
//! Copyright string used in Windows .rc files
#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " " COPYRIGHT_HOLDERS_FINAL
/**
* bitcoind-res.rc includes this file, but it cannot cope with real c++ code.
* 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)
// Windows .rc files include this header, but they cannot cope with real C++ code.
#if !defined(RC_INVOKED)
#include <string>
#include <vector>
@ -44,6 +39,6 @@ std::string CopyrightHolders(const std::string& strPrefix);
/** Returns licensing information (for -version) */
std::string LicenseInfo();
#endif // WINDRES_PREPROC
#endif // RC_INVOKED
#endif // BITCOIN_CLIENTVERSION_H