[MacPorts] #19781: modify cmake Modules for MacPorts prefix

MacPorts noreply at macports.org
Tue Jun 2 21:32:48 PDT 2009


#19781: modify cmake Modules for MacPorts prefix
-----------------------------------------+----------------------------------
 Reporter:  dweber@…                     |       Owner:  css@…           
     Type:  enhancement                  |      Status:  assigned        
 Priority:  Normal                       |   Milestone:                  
Component:  ports                        |     Version:  1.7.1           
 Keywords:  FindITK.cmake cmake modules  |        Port:  cmake           
-----------------------------------------+----------------------------------

Comment(by dweber@…):

 This will list all the module files that already contain /opt/local

 {{{
 $ grep -C3 ".*/opt/local.*" /opt/local/share/cmake-2.6/Modules/*.cmake
 }}}

 Note that it doesn't resolve the issue of path precedence.  For example:

 {{{
 /opt/local/share/cmake-2.6/Modules/Findosg_functions.cmake-
 PATH_SUFFIXES lib64 lib
 /opt/local/share/cmake-2.6/Modules/Findosg_functions.cmake-       PATHS
 /opt/local/share/cmake-2.6/Modules/Findosg_functions.cmake-            /sw
 # Fink
 /opt/local/share/cmake-2.6/Modules/Findosg_functions.cmake:
 /opt/local # DarwinPorts
 /opt/local/share/cmake-2.6/Modules/Findosg_functions.cmake-
 /opt/csw # Blastwave
 /opt/local/share/cmake-2.6/Modules/Findosg_functions.cmake-
 /opt
 /opt/local/share/cmake-2.6/Modules/Findosg_functions.cmake-
 /usr/freeware
 }}}

 Here, the path precedence favors the main alternative to MacPorts for
 open-source ports on OSX - Fink.  If anyone has both Fink and MacPorts
 installed, any of their MacPorts that have a cmake build which requires
 any such module could link against a Fink library because of a cmake
 module path precedence (even if /opt/local is in the module search path).

 I'm not aware of a cmake build-time config variable that allows distros to
 set a specific module search path.  That would be really neat!  Maybe
 something like:

 {{{
 -D CMAKE_MODULE_PREFIX_PATH:STRING=/opt/local;/usr/local;/usr
 -D
 CMAKE_MODULE_INCLUDE_PATH:STRING=/opt/local/include;/usr/local/include;/usr/include
 -D
 CMAKE_MODULE_LIBRARY_PATH:STRING=/opt/local/lib;/usr/local/lib;/usr/lib;/usr/lib64
 }}}

 If they could be defined, then all the Module files would have to use
 those cmake variables to define their search paths, rather than have them
 hard-coded in the module files.  I'll suggest this upstream at Kitware and
 see what happens.

 Darren

-- 
Ticket URL: <http://trac.macports.org/ticket/19781#comment:10>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list