test_file = 'testDObject.cpp' exe_name = test_file.split('.')[0] executable( exe_name, test_file, include_directories: include_directories('../../src/dobj/public'), link_with: libdobj, # Link the dobj library install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly )