File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 28
28
29
29
outp .write ("#ifndef _" + guardSuffix + "_BUILTINRESOURCEDATA_H_\n " )
30
30
outp .write ("#define _" + guardSuffix + "_BUILTINRESOURCEDATA_H_\n " )
31
+
32
+ outp .write ("#ifdef _WIN32 // Visual Studio define\n " )
33
+ outp .write ("#include <codeanalysis\warnings.h>\n " )
34
+ outp .write ("#pragma warning( push )\n " )
35
+ outp .write ("#pragma warning ( disable : ALL_CODE_ANALYSIS_WARNINGS )\n " )
36
+ outp .write ("#endif // _WIN32\n " )
37
+
31
38
outp .write ("#include <stdlib.h>\n " )
32
39
outp .write ("#include <cstdint>\n " )
33
40
outp .write ("#include <string>\n " )
76
83
else :
77
84
outp .write ('\n \t \t template<> const std::pair<const uint8_t*, size_t> get_resource<NBL_CORE_UNIQUE_STRING_LITERAL_TYPE("%s")>();' % itemData [i ].rstrip ())
78
85
79
- outp .write ("\n \t }" )
80
- outp .write ("\n #endif // _" + guardSuffix + "_BUILTINRESOURCEDATA_H_" )
86
+ outp .write ("\n \t }\n " )
87
+
88
+ outp .write ("#ifdef _WIN32\n " )
89
+ outp .write ("#pragma warning( pop )\n " )
90
+ outp .write ("#endif // _WIN32\n " )
91
+
92
+ outp .write ("#endif // _" + guardSuffix + "_BUILTINRESOURCEDATA_H_" )
81
93
82
94
outp .close ()
Original file line number Diff line number Diff line change @@ -159,6 +159,10 @@ function(ADD_CUSTOM_BUILTIN_RESOURCES _TARGET_NAME_ _BUNDLE_NAME_ _BUNDLE_SEARCH
159
159
if (TARGET Nabla )
160
160
get_target_property (_NABLA_INCLUDE_DIRECTORIES_ Nabla INCLUDE_DIRECTORIES )
161
161
162
+ if (NBL_STATIC_BUILD AND _LIB_TYPE_ STREQUAL SHARED )
163
+ message (FATAL_ERROR "Nabla must be built as dynamic library in order to combine this tool with SHARED setup!" )
164
+ endif ()
165
+
162
166
if (NOT _NBL_INTERNAL_BR_CREATION_ )
163
167
target_link_libraries (${_TARGET_NAME_} Nabla ) # be aware Nabla must be linked to the BRs
164
168
endif ()
You can’t perform that action at this time.
0 commit comments