Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
cmake: support for .res listings
Browse files Browse the repository at this point in the history
  • Loading branch information
FauxFaux committed May 22, 2018
1 parent d82540c commit 0ae0e9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mkcmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ def main():

if win:
headers.append('windows/winstuff.h')
files.extend('windows/{}.rc'.format(x.split('.')[0]) for x in expanded if x.endswith('.res'))
else:
headers.append('unix/unix.h')

Expand Down Expand Up @@ -159,7 +160,8 @@ def expand(map, list):
def to_path(dirs, items):
for item in items:
if '.' in item:
sys.stderr.write('ignoring path {}\n'.format(item))
if not item.endswith('.lib') and not item.endswith('.res'):
sys.stderr.write('ignoring path {}\n'.format(item))
else:
yield find_c_file(dirs, item)

Expand Down
3 changes: 3 additions & 0 deletions windows/windlg.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ static int SaneDialogBox(HINSTANCE hinst,

hwnd = CreateDialog(hinst, tmpl, hwndparent, lpDialogFunc);

// a failure here means linking has gone wrong; resources are missing
assert(hwnd);

SetWindowLongPtr(hwnd, BOXFLAGS, 0); /* flags */
SetWindowLongPtr(hwnd, BOXRESULT, 0); /* result from SaneEndDialog */

Expand Down

0 comments on commit 0ae0e9a

Please sign in to comment.