Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site











SourceForge.net Logo

import.ext - importing libraries

Sometimes it is useful to transform 3rd party code into U++ package. There are several methods to do that, however if 3rd party code is huge codebase of hundreds or thousands files, traditional approaches (e.g. put all these files into package) are tedious or outright impossible.

 

To solve this issue, concept of import description file was introduced. This describes which files of external library are to be compiled and helps with setting up include path.

 

Import description file is file in package with name "import.ext"

 

Here is an example of import.ext content:

 

files *.cpp *.c;

 

exclude

    port/vsipreload.cpp

    ogr/generate_encoding_table.c

    */geojson/*

    */sqlite/*

    */sqlite3/*

    */pg/*

    */sde/*

    */sosi/*

    */tiger/*

    */vfk/*

    */shape/*

    */libkml/*

    */dgn/*

    */arcobjects/*

    */dods/*

    */dwg/*

    */filegdb/*

    */fme/*

    */gpkg/*

    */grass/*

    */idb/*

    */ingres/*

    */ili/*

    */mdb/*

    */mysql/*

    */kml/*

    */nas/*

    */idrisi/*

    */xlsx/*

    */xls/*

    */oci/*

    */ogdi/*

    */ods/*

    */gpkg/*

    */osm/*

    port/cpl_win32ce_api.cpp

    frmts/*

;

 

includes *.h *.hpp;

 

In this case, line with "files" basically says that all .cpp and .h files found in package folder are to be added into the project. "exclude" specifies exceptions to this. "includes" adds folders of all matching files into include path.

 

Set of directives:

 

files

Adds all files that match the pattern the set of files to be added to package. Pattern can use '*' wildcard.

exclude

Removes files that match the pattern from the set.

include_path

Adds folders that match the pattern to the include path.

exclude_path

Removes directories from the include path (only folders added by import.ext can be removed)

includes

Adds folders of all matching files into include path.

 

Note that all file paths are relative to the root of package directory.

 

Last edit by cxl on 09/06/2015. Do you want to contribute?. T++