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 2828
2929 outp .write ("#ifndef _" + guardSuffix + "_BUILTINRESOURCEDATA_H_\n " )
3030 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+
3138 outp .write ("#include <stdlib.h>\n " )
3239 outp .write ("#include <cstdint>\n " )
3340 outp .write ("#include <string>\n " )
7683 else :
7784 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 ())
7885
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_" )
8193
8294 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
159159 if (TARGET Nabla)
160160 get_target_property (_NABLA_INCLUDE_DIRECTORIES_ Nabla INCLUDE_DIRECTORIES )
161161
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+
162166 if (NOT _NBL_INTERNAL_BR_CREATION_)
163167 target_link_libraries (${_TARGET_NAME_} Nabla) # be aware Nabla must be linked to the BRs
164168 endif ()
You can’t perform that action at this time.
0 commit comments