Skip to content

Commit c540ede

Browse files
committed
Merge bitcoin#32633: windows: Use predefined RC_INVOKED macro instead of custom one
55f1c2a 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 55f1c2a fanquake: ACK 55f1c2a Tree-SHA512: cf18e03d0c2b1cd590e379707fc6d1775f08814f20aa51c0c40b9eac6227f42a6e07ba3e478da7d511ace29782bf964eae3edfeb04bcb1f87596966bdd3a55c9
2 parents 14c16e8 + 55f1c2a commit c540ede

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

cmake/module/AddWindowsResources.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ include_guard(GLOBAL)
77
function(add_windows_resources target rc_file)
88
if(WIN32)
99
target_sources(${target} PRIVATE ${rc_file})
10-
set_property(SOURCE ${rc_file}
11-
APPEND PROPERTY COMPILE_DEFINITIONS WINDRES_PREPROC
12-
)
1310
endif()
1411
endfunction()
1512

src/clientversion.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,8 @@
1717
//! Copyright string used in Windows .rc files
1818
#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " " COPYRIGHT_HOLDERS_FINAL
1919

20-
/**
21-
* bitcoind-res.rc includes this file, but it cannot cope with real c++ code.
22-
* WINDRES_PREPROC is defined to indicate that its pre-processor is running.
23-
* Anything other than a define should be guarded below.
24-
*/
25-
26-
#if !defined(WINDRES_PREPROC)
20+
// Windows .rc files include this header, but they cannot cope with real C++ code.
21+
#if !defined(RC_INVOKED)
2722

2823
#include <string>
2924
#include <vector>
@@ -44,6 +39,6 @@ std::string CopyrightHolders(const std::string& strPrefix);
4439
/** Returns licensing information (for -version) */
4540
std::string LicenseInfo();
4641

47-
#endif // WINDRES_PREPROC
42+
#endif // RC_INVOKED
4843

4944
#endif // BITCOIN_CLIENTVERSION_H

0 commit comments

Comments
 (0)