[OpendTect_Developers] R: CMake Help

Corrao Antonio Antonio.Corrao at eni.com
Mon Jul 9 12:26:47 CEST 2012


Dear all,
I started planning for migrating my home written plugins (currently deployed on version 4.2) to version 4.4.
The main difficulty I have found is related to external libraries: all my plugin link external libraries (either dynamic or static ones), both commercial and in-house developed.

The Pmake system was fairly easy to grasp, and I did make all modifications needed to support such functionalities (the original mkshlibs script did not handle large libraries too well - unpacking them - but it was easy to customize).

Now, I have no experience with cmake and it seems fairly elaborate to digest from scratch. Do you have any example of cmake file for a plugin that links external shared/static libraries?
Also, I would appreciate some pointers to cmake tutorials/how-to(s) in order to have a minimal understanding of how it works (without spending too much time) and to be able to do small modifications.

Thank you,

Antonio Corrao

Geophysical Studies & Geophysics for Reservoir
eni S.p.A. - Exploration & Production Division
mailto: antonio.corrao at eni.com


-----Messaggio originale-----
Da: developers-bounces at opendtect.org [mailto:developers-bounces at opendtect.org] Per conto di Kristofer Tingdahl
Inviato: giovedì 19 aprile 2012 7.59
A: developers at opendtect.org
Cc: OpendTect Support; David Epelboim
Oggetto: Re: [OpendTect_Developers] CMake Help

Dear OpendTect coders!

Following our new development release, I got the question how one can
add dependencies to external libs. The question was about flexlm and
QT.


1. With QT, you can do a couple of things. Our cmake macros has
support to include them, and the easiest way to do that is to set the
variable:

SET( OD_USEQT Gui ) before running the OD_INIT_MODULE() macro. The
possible values of the OD_USEQT variable are: Core Sql Gui and OpenGL.

This will probably generate an error initially, as qt cannot be found.
This is then done by setting the QTDIR parameter, for example
c:\qt-win-opensource-src-4.5.3. This is easiest done in the cmake-gui,
where you search for the QTDIR parameter and set it.

2. FLEXLM

If you want to integrate external libraries, you can either use
CMake's internal things, such as find_package and so forth. For most,
it will be possible to do the following in before the OD_INIT_MODULE()
macro call:

SET ( OD_MODULE_EXTERNAL_LIBS c:\PATH\TO\flexlm.lib )

and

SET ( OD_MODULE_INCLUDEPATH c:\path\to\flexlm\inlude\files )

These two settings will make the compiler include the library in the
dependency list of your library or your executable (only if there is
no library) and add the include-path to the compilation so the header
files will be found.



As this is a pre-release, we want to have your input on what's not
working, or simple things that will make your life easier in our new
make system. Let us know at support at opendtect.org. General discussions
can be held on the developers' mailing list.



Happy coding.


--
Kristofer Tingdahl, Ph. D.
CEO
dGB Earth Sciences
http://www.dgbes.com


_____________________________________________________________
OpendTect Developers mailing list Developers at opendtect.org
http://www.opendtect.org/mailman/listinfo/developers

You receive this mail because you are listed on developers at opendtect.org To unsubscribe please go to http://lists.opendtect.org/mailman/options/developers . If you encounter any problems, please contact support at opendtect.org .

eni spa
Sede Legale
Piazzale Enrico Mattei, 1
00144 Roma - Italia

Capitale sociale
euro 4.005.358.876,00 i.v.
Codice Fiscale e Registro Imprese di Roma n. 00484960588
Partita IVA n. 00905811006
R.E.A. Roma n. 756453

Sedi secondarie:
Via Emilia, 1 e Piazza Ezio Vanoni, 1
20097 San Donato Milanese (Milano) – Italia

eni.com<http://www.eni.com>

________________________________
Message for the recipient only, if received in error, please notify the sender and read http://www.eni.com/disclaimer/


More information about the Developers mailing list