Skip to content

Commit 55f1c2a

Browse files
committed
windows: Use predefined RC_INVOKED macro instead of custom one
1 parent 14c16e8 commit 55f1c2a

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)