Hello Valmor,
there is a way to do it, in fact that is how we do it ourselves now
(we use different repositories - hermes_examples, hermes_tutorial - in
different locations) and we only use CMake to link against hermes2d.
But basically it is just as with any other library.
You compile and install Hermes (by running sudo make install), and it
installs hermes to standard locations (unless you changed the
CMake.vars variable "TARGET_ROOT" while compiling Hermes) - so to
/usr/local/lib, /usr/local/include.
And then you in your code include the location for the header files of
hermes (in /usr/local/include) - including "hermes2d.h" is enough and
you link against the library with -L /usr/local/lib.
Also, if you want to employ CMake to do the work for you, take a look
at how it is done with the repositories hermes_examples,
hermes_tutorial.
Look at the following (to be found in CMakeLists.txt, and the "cmake"
folder in the root):
CMakeLists.txt:
....
# Where to look for the static libraries.
set(HERMES_DIRECTORY /usr/local/lib)
set(HERMES_INCLUDE_PATH /usr/local/include)
...
set(HERMES2D_INCLUDE_PATH ${HERMES_INCLUDE_PATH}/hermes2d)
set(HERMES_COMMON_INCLUDE_PATH ${HERMES_INCLUDE_PATH}/hermes_common)
find_package(HERMES_COMMON REQUIRED)
include_directories(${HERMES_COMMON_INCLUDE_PATH})
include_directories(${HERMES2D_INCLUDE_PATH})
...
And then files:
\hermes-examples\cmake\CommonTargetProperties.cmake
\hermes-examples\cmake\FindHERMES.cmake
\hermes-examples\cmake\FindHERMES_COMMON.cmake
Looking for the libraries and linking to them.
If you need to navigate more directly, I will probably write some
short tutorial how to do that.
Best Regards,
Lukas
> --
> You received this message because you are subscribed to the Google Groups "hermes2d" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
hermes2d+u...@googlegroups.com.
> To post to this group, send email to
herm...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/hermes2d.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>
--
Lukáš Korous