<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">I built a beta-version of the
FindPantheios.cmake (see attached version, no copyright stuff, I'm
sorry), it works - at least on windows and in my configuration.<br>
As I am new to this and this is my first try with Find* files,
could those experienced in the art of CMakeing please have a look
at it, give me some tips & tricks?<br>
Suggestions welcome ;)<br>
<br>
Another thing: I understand the function find_library is to be
used to "find" libs - the docs did not help me with understanding
the naming scheme used. Is it possible to use find_library to
locate e.g. "pantheios.1.core.vc10.x64.dll.debug.lib" if I have
the string "pantheios.1.core" and also ".dll.debug"? I do not know
anything about the part in the middle nor the ending. Sorry if
this is a stupid question :/<br>
<br>
My current solution is not very pretty and more of a hack and will
only work in Windows as it uses FILE GLOB. <br>
<br>
Third question: Is there an easy way to deal with the
singular/plural variables, for example _INCLUDE_DIR and
_INCLUDE_DIRS? How exactly is the syntax for setting those
(String, List, etc)?<br>
<br>
Thank you for your time, help and patience<br>
<br>
Philipp Berger<br>
<br>
Am 13.07.2012 08:30, schrieb Rolf Eike Beer:<br>
</div>
<blockquote cite="mid:1649119.vu64yGRANj@donald.sf-tec.de"
type="cite">
<pre wrap="">Am Freitag, 13. Juli 2012, 02:41:50 schrieb Philipp Berger:
</pre>
<blockquote type="cite">
<pre wrap="">Hello everybody,
I'm relatively new to CMake, but managed to learn everything I needed,
up until now.
For a software project in C++ we want to use Pantheios (
<a class="moz-txt-link-freetext" href="http://www.pantheios.org">http://www.pantheios.org</a> <a class="moz-txt-link-rfc2396E" href="http://www.pantheios.org/"><http://www.pantheios.org/></a> ) as logging framework.
Sadly, there is no FindPantheios.cmake file readily available, so I set of
to write my own.
The part for searching the include files/path was easy.
The big problem I am facing and find myself unable to solve is the wide
variety of library files.
The amount of available lib files is huge, see the attached file for the
list.
For example, the core libs:
pantheios.1.core.vc10.x64.dll.debug.lib
pantheios.1.core.vc10.x64.dll.lib
pantheios.1.core.vc10.x64.mt.debug.lib
pantheios.1.core.vc10.x64.mt.lib
pantheios.1.core.vc10.x64.widestring.dll.debug.lib
pantheios.1.core.vc10.x64.widestring.dll.lib
pantheios.1.core.vc10.x64.widestring.mt.debug.lib
pantheios.1.core.vc10.x64.widestring.mt.lib
I would like to have a checkbox to select Widestring capability yes/no.
A main problem for me is to check that the selected libs are valid for
the current configuration (if VC10 x64 was selected as compiler, only
allow vc10.x64 libs) - is there a way to securely achieve that? Or
should I rather let the user select arbitrary lib files and hope that
they will work?
What I need is six fields for the user to select lib files - the core
lib, one frontend and a backend. And that for both Debug and Release. It
would be much more useful if the user could select from a dropdown menu
which Front-/Backend he would like together with the Widestring checkbox
and the CMake file would assign the required Debug and Release libs to
the variables, but as sated above, I do not know how to produce the
required version string and how to create such mechanisms in CMake in
general.
</pre>
</blockquote>
<pre wrap="">
The debug/release stuff can be handled by CMake, just put both of them in the
result variable prefixed with "debug" and "optimized". See what I've done
recently in e.g. FindBZip2.cmake.
I would put the backends in the COMPONENTS section, as well as the widestring,
so you could do something like this:
find_package(Pantheios COMPONENTS SomeBackend WideString)
</pre>
</blockquote>
Thanks for the tip, I implemented that.<br>
<blockquote cite="mid:1649119.vu64yGRANj@donald.sf-tec.de"
type="cite">
<pre wrap="">
Choose one backend as default for the case the user does not select any and
raise an error if more than one is specified (unless that actually makes sense,
dunno).
Eike</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">--
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the CMake FAQ at: <a class="moz-txt-link-freetext" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></pre>
</blockquote>
<br>
<br>
</body>
</html>