Am 18.08.2012 05:32, schrieb Craig Miller:
I'm working on a port that has a FindXYZ.cmake file as one of it's files.  I'm 
having a lot of trouble getting this file installed to a location where it can 
be found.  If I install FindXYZ.cmake to the /opt/local/cmake-2.8/Modules path 
it will be found and my XYZ libs/includes will also be found.  As my 
FindXYZ.cmake file isn't a part of the official cmake macports distribution 
this seems like a bad idea.  I'd like to install the FindXYZ.cmake file under 
/opt/local/XYZ/cmake/ or something similar.

The CMake documentation indicates that the file needs to be on the 
CMAKE_MODULE_PATH.  Even if I explicitly set this path, the version of cmake 
that macports installs doesn't seem to be finding it.  I'm sure I'm doing 
something wrong as I'm *very* new to MacPorts.
I wrote several FindXX.cmake files for my own non-macports libs
and they get found by macport's cmake
when having CMAKE_MODULE_PATH point to their directory.

I don't have experience with the particular question you have,
but macports defines a "PortGroup cmake" for setting the right defaults
for port that use cmake to build.

In the source file (dports/_resources/port1.0/group/cmake-1.0.tcl)
you can find:
--
# standard place to install extra CMake modules
set cmake_share_module_dir ${prefix}/share/cmake/modules
--

This directory then gets used as the CMAKE_MODULE_PATH during
the configuration phase.
So I'd guess that it's a good idea to install your Find Module
into that directory to get your library found by other macports
using cmake.

Regards
Titus
_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to