Skip to content

Commit

Permalink
Merge pull request #13 from asmwarrior/main
Browse files Browse the repository at this point in the history
support linking to the debug version of wx library
  • Loading branch information
eranif committed Oct 12, 2022
2 parents cf6c316 + ac58953 commit b339dc6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/wx-config.cpp
Expand Up @@ -73,6 +73,10 @@ int main(int argc, char** argv)
string build = build_cfg["BUILD"];
string vendor = build_cfg["VENDOR"];

string debug_lib_suffix;
if(build == "debug")
debug_lib_suffix = "d";

const auto& libs = parser.get_libs();
for(const auto& lib : libs) {
if(lib == "base") {
Expand Down Expand Up @@ -133,14 +137,14 @@ int main(int argc, char** argv)
// monolithic lib
stringstream libname;
// example: libwxmsw31u.a
libname << "wxmsw" << build_cfg["WXVER_MAJOR"] << build_cfg["WXVER_MINOR"] << "u";
libname << "wxmsw" << build_cfg["WXVER_MAJOR"] << build_cfg["WXVER_MINOR"] << "u" << debug_lib_suffix;
ss << "-l" << libname.str() << " ";
} else {
// translate lib name to file name
const auto& libs = parser.get_libs();
for(const auto& lib : libs) {
if(libs_map.count(lib)) {
ss << "-l" << libs_map[lib] << " ";
ss << "-l" << libs_map[lib] << debug_lib_suffix << " ";
}
}
}
Expand Down

0 comments on commit b339dc6

Please sign in to comment.