[Gmsh] CMakeLists.txt request

Christophe Geuzaine cgeuzaine at ulg.ac.be
Sun Jun 23 20:09:35 CEST 2013


On 23 Jun 2013, at 18:54, David Bernstein <david at terafrac.org> wrote:

> Ok thanks.  On osx this doesn't seem to work as gmsh appears to put the library and include files in unusual places (i.e., not in /usr/local/include or /usr/opt/local/include etc.).
> 

Indeed: you need to set "ENABLE_OS_SPECIFIC_INSTALL" to false in that case. (On Mac for example by default we install files to create a ".dmg" package.)

> In any case, it would be nice if the Gmsh source came with a FindGmsh.cmake file so that users could use find_package.  There are a few versions of this file floating around the web that people have written for their projects so some examples are available to build on.
> 

Sounds good. I'm adding this to our TODO list.



> Dave
> 
> On Jun 22, 2013, at 11:51 PM, Christophe Geuzaine <cgeuzaine at ulg.ac.be> wrote:
> 
>> 
>> On 23 Jun 2013, at 03:14, David Bernstein <david at terafrac.org> wrote:
>> 
>>> Dear Gmsh developers, Could the Gmsh cmakelists.txt file be modified to produce a GmshConfig.cmake or gmsh-config.cmake file?  That way I can use find_package(Gmsh) in my project so I can use the API.  I read the api-demo project and understand the approach there but would prefer that find_package work as in my project the development is done on one platform (osx) while the nightly builds are done on another (ubuntu).
>>> 
>> 
>> I GetDP we simply search for the installed Gmsh library and includes like this:
>> 
>> find_library(GMSH_LIB Gmsh PATH_SUFFIXES lib)
>> find_path(GMSH_INC "Gmsh.h" PATH_SUFFIXES include gmsh include/gmsh)
>> if(GMSH_LIB AND GMSH_INC)
>> # use ${GMSH_LIB} and ${GMSH_INC}
>> endif(GMSH_LIB AND GMSH_INC)
>> 
>> 
>> 
>>> Thanks,
>>> Dave
>>> _______________________________________________
>>> gmsh mailing list
>>> gmsh at geuz.org
>>> http://www.geuz.org/mailman/listinfo/gmsh
>> 
>> -- 
>> Prof. Christophe Geuzaine
>> University of Liege, Electrical Engineering and Computer Science 
>> http://www.montefiore.ulg.ac.be/~geuzaine
>> 
>> 
>> 
> 
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine