(self, platformIdentifier, configuration, libraries, libOverrides = {})
return details
Interrogates UnrealBuildTool about the build flags for the specified third-party libraries
Interrogates UnrealBuildTool about the build flags for the specified third-party libraries
Interrogates UnrealBuildTool about the build flags for the specified third - party libraries
def interrogate(self, platformIdentifier, configuration, libraries, libOverrides = {}):
		"""
		Interrogates UnrealBuildTool about the build flags for the specified third-party libraries
		"""
		
		# Determine which libraries need their modules parsed by UBT, and which are override-only
		libModules = list([lib for lib in libraries if lib not in libOverrides])
		
		# Check that we have at least one module to parse
		details = ThirdPartyLibraryDetails()
		if len(libModules) > 0:
			
			# Retrieve the list of third-party library modules from UnrealBuildTool
			modules = self._getThirdPartyLibs(platformIdentifier, configuration)
			
			# Filter the list of modules to include only those that were requested
			modules = [m for m in modules if m['Name'] in libModules]
			
			# Emit a warning if any of the requested modules are not supported
			names = [m['Name'] for m in modules]
			unsupported = ['"' + m + '"' for m in libModules if m not in names]
			if len(unsupported) > 0:
				Utility.printStderr('Warning: unsupported libraries ' + ','.join(unsupported))
			
			# Iterate over the modules and perform any necessary transformations
			for module in modules:
				
				# In Unreal Engine 4.24.0 the `PublicLibraryPaths` key was removed and the `PublicSystemLibraryPaths` key was added to provide
				# backwards-compatibility with the legacy search path behaviour (with a warning emitted when a qualified path is not specified)
				# (See <https://docs.unrealengine.com/en-US/Support/Builds/ReleaseNotes/4_24/index.html#unrealbuildtool> for details)
				if 'PublicSystemLibraryPaths' in module and 'PublicLibraryPaths' not in module:
					module['PublicLibraryPaths'] = module['PublicSystemLibraryPaths']
				
				# In Unreal Engine 4.26.0, the `PublicAdditionalLibraries` key was removed from JSON output and entries are now split into `PublicLibraries` and `PublicSystemLibraries`
				# based on whether or not they are fully-qualified paths. The `PublicSystemLibraryPaths` key is used for resolving entries in `PublicSystemLibraries` as before.
				# (See this change for the implementation details: <https://github.com/EpicGames/UnrealEngine/commit/d6d7c939e5b424bf128769bd2f027f35430c0db4>)
				if 'PublicAdditionalLibraries' not in module and 'PublicLibraries' in module:
					module['PublicAdditionalLibraries'] = module['PublicLibraries']
				
				# Prior to the strict qualified/system split in Unreal Engine 4.26.0, some libraries were listed as just the filename without the leading directory (especially prevalent under Windows)
				if 'PublicLibraries' not in module and len(module['PublicAdditionalLibraries']) > 0 and len(module['PublicLibraryPaths']) > 0:
					libPath = (self._absolutePaths(module['PublicLibraryPaths']))[0]
					libs = list([lib.replace('\\', '/') for lib in module['PublicAdditionalLibraries']])
					libs = list([os.path.join(libPath, lib) if '/' not in lib else lib for lib in libs])
					module['PublicAdditionalLibraries'] = libs
				
				# Older versions of the Unreal Engine don't list system libraries separately, so make sure we always have a list even if it's empty
				if 'PublicSystemLibraries' not in module:
					module['PublicSystemLibraries'] = []
			
			# Flatten the lists of paths
			fields = [
				'Directory',
				'PublicSystemLibraries',
				'PublicAdditionalLibraries',
				'PublicLibraryPaths',
				'PublicSystemIncludePaths',
				'PublicIncludePaths',
				'PrivateIncludePaths',
				'PublicDefinitions'
			]
			flattened = {}
			for field in fields:
				transform = (lambda l: self._absolutePaths(l)) if field not in ['Definitions', 'PublicSystemLibraries'] else None
				flattened[field] = self._flatten(field, modules, transform)
			
			# Compose the prefix directories from the module root directories, the header and library paths, and their direct parent directories
			libraryDirectories = flattened['PublicLibraryPaths']
			headerDirectories  = flattened['PublicSystemIncludePaths'] + flattened['PublicIncludePaths'] + flattened['PrivateIncludePaths']
			modulePaths        = flattened['Directory']
			prefixDirectories  = list(set(flattened['Directory'] + headerDirectories + libraryDirectories + [os.path.dirname(p) for p in headerDirectories + libraryDirectories]))
			
			# Wrap the results in a ThirdPartyLibraryDetails instance, converting any relative directory paths into absolute ones
			details = ThirdPartyLibraryDetails(
				prefixDirs  = prefixDirectories,
				includeDirs = headerDirectories,
				linkDirs    = libraryDirectories,
				definitions = flattened['PublicDefinitions'],
				libs        = flattened['PublicAdditionalLibraries'],
				systemLibs  = flattened['PublicSystemLibraries']
			)
		
		# Apply any overrides
		overridesToApply = list([libOverrides[lib] for lib in libraries if lib in libOverrides])
		for override in overridesToApply:
			details.merge(override)
		
		return details
def interrogate ( self , platformIdentifier , configuration , libraries , libOverrides = { } ) : # Determine which libraries need their modules parsed by UBT, and which are override-only libModules = list ( [ lib for lib in libraries if lib not in libOverrides ] ) # Check that we have at least one module to parse details = ThirdPartyLibraryDetails ( ) if len ( libModules ) > 0 : # Retrieve the list of third-party library modules from UnrealBuildTool modules = self . _getThirdPartyLibs ( platformIdentifier , configuration ) # Filter the list of modules to include only those that were requested modules = [ m for m in modules if m [ 'Name' ] in libModules ] # Emit a warning if any of the requested modules are not supported names = [ m [ 'Name' ] for m in modules ] unsupported = [ '"' + m + '"' for m in libModules if m not in names ] if len ( unsupported ) > 0 : Utility . printStderr ( 'Warning: unsupported libraries ' + ',' . join ( unsupported ) ) # Iterate over the modules and perform any necessary transformations for module in modules : # In Unreal Engine 4.24.0 the `PublicLibraryPaths` key was removed and the `PublicSystemLibraryPaths` key was added to provide # backwards-compatibility with the legacy search path behaviour (with a warning emitted when a qualified path is not specified) # (See <https://docs.unrealengine.com/en-US/Support/Builds/ReleaseNotes/4_24/index.html#unrealbuildtool> for details) if 'PublicSystemLibraryPaths' in module and 'PublicLibraryPaths' not in module : module [ 'PublicLibraryPaths' ] = module [ 'PublicSystemLibraryPaths' ] # In Unreal Engine 4.26.0, the `PublicAdditionalLibraries` key was removed from JSON output and entries are now split into `PublicLibraries` and `PublicSystemLibraries` # based on whether or not they are fully-qualified paths. The `PublicSystemLibraryPaths` key is used for resolving entries in `PublicSystemLibraries` as before. # (See this change for the implementation details: <https://github.com/EpicGames/UnrealEngine/commit/d6d7c939e5b424bf128769bd2f027f35430c0db4>) if 'PublicAdditionalLibraries' not in module and 'PublicLibraries' in module : module [ 'PublicAdditionalLibraries' ] = module [ 'PublicLibraries' ] # Prior to the strict qualified/system split in Unreal Engine 4.26.0, some libraries were listed as just the filename without the leading directory (especially prevalent under Windows) if 'PublicLibraries' not in module and len ( module [ 'PublicAdditionalLibraries' ] ) > 0 and len ( module [ 'PublicLibraryPaths' ] ) > 0 : libPath = ( self . _absolutePaths ( module [ 'PublicLibraryPaths' ] ) ) [ 0 ] libs = list ( [ lib . replace ( '\\' , '/' ) for lib in module [ 'PublicAdditionalLibraries' ] ] ) libs = list ( [ os . path . join ( libPath , lib ) if '/' not in lib else lib for lib in libs ] ) module [ 'PublicAdditionalLibraries' ] = libs # Older versions of the Unreal Engine don't list system libraries separately, so make sure we always have a list even if it's empty if 'PublicSystemLibraries' not in module : module [ 'PublicSystemLibraries' ] = [ ] # Flatten the lists of paths fields = [ 'Directory' , 'PublicSystemLibraries' , 'PublicAdditionalLibraries' , 'PublicLibraryPaths' , 'PublicSystemIncludePaths' , 'PublicIncludePaths' , 'PrivateIncludePaths' , 'PublicDefinitions' ] flattened = { } for field in fields : transform = ( lambda l : self . _absolutePaths ( l ) ) if field not in [ 'Definitions' , 'PublicSystemLibraries' ] else None flattened [ field ] = self . _flatten ( field , modules , transform ) # Compose the prefix directories from the module root directories, the header and library paths, and their direct parent directories libraryDirectories = flattened [ 'PublicLibraryPaths' ] headerDirectories = flattened [ 'PublicSystemIncludePaths' ] + flattened [ 'PublicIncludePaths' ] + flattened [ 'PrivateIncludePaths' ] modulePaths = flattened [ 'Directory' ] prefixDirectories = list ( set ( flattened [ 'Directory' ] + headerDirectories + libraryDirectories + [ os . path . dirname ( p ) for p in headerDirectories + libraryDirectories ] ) ) # Wrap the results in a ThirdPartyLibraryDetails instance, converting any relative directory paths into absolute ones details = ThirdPartyLibraryDetails ( prefixDirs = prefixDirectories , includeDirs = headerDirectories , linkDirs = libraryDirectories , definitions = flattened [ 'PublicDefinitions' ] , libs = flattened [ 'PublicAdditionalLibraries' ] , systemLibs = flattened [ 'PublicSystemLibraries' ] ) # Apply any overrides overridesToApply = list ( [ libOverrides [ lib ] for lib in libraries if lib in libOverrides ] ) for override in overridesToApply : details . merge ( override ) return details