Skip to content

Commit 06ee1d1

Browse files
committed
Fix .mm file not actually being built.
1 parent 2ce797e commit 06ee1d1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

SConstruct

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,11 @@ python_sources = set()
199199

200200
sources.update(pathlib.Path('src').glob('**/*.cpp'))
201201

202+
if env['platform'] == 'macos':
203+
# For Objective-C++ files
204+
env.Append(CCFLAGS = ['-ObjC++'])
205+
sources.update(pathlib.Path('src').glob('**/*.mm'))
206+
202207
for ext in ('py', 'pyc', 'json', 'svg', 'md'):
203208
python_sources.update(pathlib.Path('lib').glob(f'**/*.{ext}'))
204209

@@ -348,9 +353,6 @@ if env['platform'] == 'windows':
348353
# linker has trouble if the table is too large
349354
env.Append(CPPDEFINES = ['CLASS_VIRTUAL_CALL_TABLE_SIZE=512'])
350355
elif env['platform'] == 'macos':
351-
# For Objective-C++ files
352-
env.Append(CCFLAGS = ['-ObjC++'])
353-
354356
# Need to set the rpath for relative loading of libpython to succeed.
355357
# This doesn't work for some reason
356358
# env.Replace(RPATH=['@loader_path'])

0 commit comments

Comments
 (0)