Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. prj = env.ImportProject ()
    since no name is provided, the local project is targeted
  2. core = env.ImportProject (name = ‘CORE’)
    access the project named core.  Since this one is pre-initialized, this is an access, not a creation
  3. csc = env.ImportProject (name = ‘CSC’)
    If the project was previously created, it is just accessed.
    If not, the project is created, using the current project as a template, i.e. it assumes the same include and library directory layout, as it does the library prefix and suffix.  If these need customizing the full call is

    Code Block
    env.ImportProject (name = <name>,
                       root    = <root_directory>,
                       incdir = <include_directory>,  (can be absolute or relative to root, eg ‘inc’),
                       libdir = <library_directory>,   (can be absolute or relative to root, ‘iib’),
                       pkgdir = <package_directory>, (this is not too useful),
                       libprefix = <library_prefix> ,    (eg ‘lib’),
                       libsuffix = <library_suffix>,      (eg ‘.so’)

    Here’s the call I use to initialize the ‘CORE’ project

    Code Block
    env.ImportProject (
    name  
    name   = 'CORE',
     
      incdir = paths.inc_core,
     
      libdir = paths.lib)

    If one had a need or desire to tailor each individual package, then the ‘pkgdir’ would be useful.
    Effectively one could create a ‘Project’ for each package.

...