[Dune] find dune-modules in non-default location with dunecontrol

Simon Praetorius simon.praetorius at tu-dresden.de
Fri Apr 14 13:37:41 CEST 2017


Hi everyone,

I'm currently struggling with `dunecontrol` and the dune way of working
with cmake:

# Problem description
I created a new dune-module that depends on some dune core-modules. This
new module is not developed in the location `DUNE_CONTROL_PATH` where
all other dune core-modules are located. This new module creates a
library I want to use in some projects. In order to provide the include
files, library files and cmake configurations I installed the new
dune-module into an `CMAKE_INSTALL_PREFIX` location.

# Question
Now, how do I find this module in a projects that adds this to its
`dune.module` file, when using dunecontrol? I tried to set the
`PKG_CONFIG_PATH` manually, but no effect. I set in the options file the
cmake module directory for the module-config.cmake file, but not effect.
I tried to look into the dunecontrol script to find out how the modules
are searched, but couldn't determine this corresponding part of the script.

# Details:
dune-core-modules --> /path-a/dune (DUNE_CONTROL_PATH) (or installed as
.deb-package)
my-dune-module --> /path-b/my-dune-module --> installed into
/path-c/my-dune-module
project --> ~/project

dune.module (of my-dune-module):
```
Depends: dune-common dune-geometry ...
Suggests: ...
```

dune.module (of project):
```
Depends: my-dune-module
```

What is the "best" workflow when using an installed dune module? Is
there anywhere a documentation of what dunecontrol actually does? Which
(env) variables can be set to control the build/fine/configure process?
What are possible options in the options-file?

When searching for the `my-dune-module` in `project` directly, e.g. by
calling `find_package` or `find_dune_package` manually, the module is
found without problems, but the behavior is different from finding by
dunecontrol, e.g. the `MyDuneModuleMacros.cmake` file is not executed
automatically. I can always do everything manually, then it is clear
what is happening and where everything is looked up, but probably this
is not the dune way of doing things, right?

I wish everyone happy eastern,
Simon

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5144 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20170414/7955552d/attachment.bin>


More information about the Dune mailing list