Exclude bundled GeographicLib from release scope to use system package

- Removed 'include' from release_items list
- Added include_exclude list with GeographicLib
- Added filtering logic to exclude include/GeographicLib during copy
- This ensures CMake finds system libgeographiclib-dev instead of bundled version
- Fixes linker errors for GeographicLib symbols in DEB build

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-10-09 14:43:33 +00:00
1 parent 9e2d8d5c61
commit d961d0fc30
1 file changed
+7 -1
+7 -1
View File
@@ -114,7 +114,6 @@ def copy_src_dir_to_dest_dir(srcdir, dstdir, perm=None, with_subdirs=True, relea
'tests',
'new_docker_build.sh',
'specs',
'include',
'translations',
'CTestCustom.ctest',
'.gitignore',
@@ -125,6 +124,9 @@ def copy_src_dir_to_dest_dir(srcdir, dstdir, perm=None, with_subdirs=True, relea
'lts-cc.conf'
]
# Directories to exclude from include folder (bundled libraries not needed for release)
include_exclude = ['GeographicLib']
if with_subdirs:
for root, dirs, files in os.walk(srcdir):
# Filter directories for release scope
@@ -148,6 +150,9 @@ def copy_src_dir_to_dest_dir(srcdir, dstdir, perm=None, with_subdirs=True, relea
elif rel_root.startswith('TetraIF'):
# Keep all subdirectories under TetraIF
pass
elif rel_root == 'include':
# In include directory, exclude bundled libraries
dirs[:] = [d for d in dirs if d not in include_exclude]
else:
# Skip other directories
dirs[:] = []
@@ -164,6 +169,7 @@ def copy_src_dir_to_dest_dir(srcdir, dstdir, perm=None, with_subdirs=True, relea
if release_scope and rel_root == '.':
if file not in release_items and not any(file == item.split('/')[0] for item in release_items if '/' in item):
continue
# Include 'include' directory but GeographicLib will be filtered during walk
src_path = os.path.join(root, file)
# Skip broken symlinks
if os.path.islink(src_path) and not os.path.exists(src_path):