Opened 15 years ago

Closed 13 years ago

#19781 closed enhancement (fixed)

modify cmake Modules for MacPorts prefix

Reported by: dweber@… Owned by: cssdev
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: FindITK.cmake cmake modules Cc:
Port: cmake

Description (last modified by dweber@…)

I'm working on an InsightToolkit port that will install into a non-standard MacPorts install path. I've discovered that the defaults in the cmake Modules may not pick up the MacPort installations. For example, in /opt/local/share/cmake-2.6/Modules/FindITK.cmake, we could modify it to the following:

    # Look in standard UNIX install locations.
    /opt/local/lib/InsightToolkit
    /usr/local/lib/InsightToolkit
    /usr/lib/InsightToolkit

I was able to get this result with a command line like this:

cat /opt/local/share/cmake-2.6/Modules/FindITK.cmake | sed -e 's|/usr/local/lib/InsightToolkit|/opt/local/lib/InsightToolkit\n\t/usr/local/lib/InsightToolkit|g'

I suppose other tweaks like this could be a part of the post-destroot for the cmake port. The goal is to allow any MacPort installation to rely on cmake modules to pick up other MacPort libraries automatically, and in preference (with precedence) to anything similar installed outside of ${prefix} on the system.

Best regards, Darren

Attachments (1)

cmakeMods.txt (30.1 KB) - added by dweber@… 15 years ago.
diff -u on prefix changes to cmake module files

Download all attachments as: .zip

Change History (13)

comment:1 Changed 15 years ago by dweber@…

More information about this...

I've got a new revision of InsightToolkit working nicely, but it works best with a modification to the cmake module for FindITK.cmake. This file is installed at

/opt/local/share/cmake-2.6/Modules/FindITK.cmake

In the current testing revision of InsightToolkit is at:

https://svn.macosforge.org/repository/macports/users/dweber/graphics/InsightToolkit/Portfile

http://trac.macports.org/changeset/51573

The post-destroot creates version specific library and include paths, with symlinks to them from a generic path, and also modifies a few configuration files, including FindITK.cmake, so the system can find these version specific installations:

post-destroot {
    # For some reason, cmake does not install into the CMAKE_INSTALL_NAME_DIR
    move ${destroot}${prefix}/lib/${name}       ${destroot}${itkLibPath}
    move ${destroot}${prefix}/include/${name}   ${destroot}${itkIncPath}
    # Create a symlink from the generic lib and include for InsightToolkit to this version
    ln -sf ${distname} ${destroot}${prefix}/lib/${name}
    ln -sf ${distname} ${destroot}${prefix}/include/${name}
    # copy FindITK.cmake to a version specific file, which might persist even
    # when cmake is updated, deactivated, etc.
    set findITK [glob ${prefix}/share/cmake-*/Modules/FindITK.cmake]
    set findITKbranch [strsed ${findITK} #FindITK#FindITK-${branch}#]
    copy ${findITK} ${destroot}${findITK}
    copy ${findITK} ${destroot}${findITKbranch}
    # Change the content of $findITK and $findITKbranch, to find MacPorts lib
    set stdlib /usr/local/lib/InsightToolkit
    set newlib ${prefix}/lib/InsightToolkit
    reinplace "s|${stdlib}|${newlib}\\\n    ${newlib}-${branch}\\\n    ${stdlib}|g" ${destroot}${findITK}
    reinplace "s|${stdlib}|${newlib}\\\n    ${newlib}-${branch}\\\n    ${stdlib}|g" ${destroot}${findITKbranch}
    # Change the content of ITKConfig.cmake
    reinplace "s|${name}|${distname}|g" ${destroot}${itkLibPath}/ITKConfig.cmake
    copy ${destroot}${itkLibPath}/ITKConfig.cmake ${destroot}${itkLibPath}/itk-${branch}-config.cmake
}

Note the reinplace commands in the post-destroot, which result in the following diff on FindITK.cmake:

--- FindITK.cmake-orig    2009-05-28 09:57:35.000000000 -0700
+++ FindITK.cmake    2009-05-28 10:00:09.000000000 -0700
@@ -50,6 +50,8 @@
     ${ITK_DIR_SEARCH}
 
     # Look in standard UNIX install locations.
+    /opt/local/lib/InsightToolkit
+    /opt/local/lib/InsightToolkit-3.12
     /usr/local/lib/InsightToolkit
     /usr/lib/InsightToolkit

Note that similar additions could be made for FindVTK.cmake, at about:

    # Look in standard UNIX install locations.
    /usr/local/lib/vtk
    /usr/lib/vtk

The problem with modification to FindITK.cmake in the InsightToolkit is that the activation stage will fail without the -f flag to force an overwrite of the FindITK.cmake file provided by cmake. It makes more sense to modify the cmake port directly.

Do you agree these are useful changes to the cmake port? Can I assume responsibility for making these changes to the cmake port?

Thanks, Darren

comment:2 Changed 15 years ago by dweber@…

Cc: css@… added

comment:3 Changed 15 years ago by dweber@…

Proposed changes now in my user svn at:

https://trac.macports.org/browser/users/dweber/devel/cmake/Portfile

It may be necessary to apply similar changes to many of the cmake modules. The changes in my svn focus only on ITK and VTK, simply for lack of time to explore other modules at the moment.

If this change is adopted in cmake, then I can remove similar hacks that are otherwise required for FindITK.cmake and FindVTK.cmake in the InsightToolkit and vtk-devel ports.

Best, Darren

comment:5 Changed 15 years ago by cssdev

Owner: changed from macports-tickets@… to css@…
Status: newassigned

I'm just returning from travel, but this was adressed in the general sense in #18420, specifically comment:ticket:18420:4. Maybe there's some way we could easily get the appropriate settings into the user's environment, because otherwise trying to manually track the changes for so many CMake modules might be troublesome to create so many modifications for each module.

comment:6 Changed 15 years ago by dweber@…

There is a simple solution to this, within the cmake port, using a bit of tcl in the post-destroot phase.

These are probably all the module files that contain /usr/local (the default prefix for most *nix open-source software):

[ dweber@X ~ ]$ grep ".*/usr/local.*" /opt/local/share/cmake-2.6/Modules/*.cmake
/opt/local/share/cmake-2.6/Modules/CMakeDetermineJavaCompiler.cmake:    /usr/local/bin
/opt/local/share/cmake-2.6/Modules/CMakeDetermineJavaCompiler.cmake:    /usr/local/java/bin
/opt/local/share/cmake-2.6/Modules/CMakeDetermineSystem.cmake:  FIND_PROGRAM(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
/opt/local/share/cmake-2.6/Modules/CMakeGenericSystem.cmake:  SET(CMAKE_INSTALL_PREFIX "/usr/local"
/opt/local/share/cmake-2.6/Modules/FindAVIFile.cmake:    /usr/local/avifile/include
/opt/local/share/cmake-2.6/Modules/FindAVIFile.cmake:    /usr/local/include/avifile
/opt/local/share/cmake-2.6/Modules/FindAVIFile.cmake:    /usr/local/avifile/lib
/opt/local/share/cmake-2.6/Modules/FindAVIFile.cmake:    /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindBLAS.cmake:    PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH
/opt/local/share/cmake-2.6/Modules/FindBLAS.cmake:    PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH
/opt/local/share/cmake-2.6/Modules/FindFLTK.cmake:    /usr/local/lib/fltk
/opt/local/share/cmake-2.6/Modules/FindFLTK.cmake:    /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindFLTK.cmake:    /usr/local/fltk
/opt/local/share/cmake-2.6/Modules/FindFLTK.cmake:      /usr/local/fltk
/opt/local/share/cmake-2.6/Modules/FindFLTK.cmake:      /usr/local/fltk/lib
/opt/local/share/cmake-2.6/Modules/FindFLTK2.cmake:    /usr/local/lib/fltk2
/opt/local/share/cmake-2.6/Modules/FindFLTK2.cmake:    /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindFLTK2.cmake:    /usr/local/fltk2
/opt/local/share/cmake-2.6/Modules/FindFLTK2.cmake:      /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindFLTK2.cmake:      /usr/local/fltk2
/opt/local/share/cmake-2.6/Modules/FindFLTK2.cmake:      /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindFLTK2.cmake:      /usr/local/fltk2/lib
/opt/local/share/cmake-2.6/Modules/FindFreetype.cmake:  /usr/local/X11R6/include
/opt/local/share/cmake-2.6/Modules/FindFreetype.cmake:  /usr/local/X11/include
/opt/local/share/cmake-2.6/Modules/FindFreetype.cmake:  /usr/local/X11R6/include
/opt/local/share/cmake-2.6/Modules/FindFreetype.cmake:  /usr/local/X11/include
/opt/local/share/cmake-2.6/Modules/FindFreetype.cmake:  /usr/local/X11R6
/opt/local/share/cmake-2.6/Modules/FindFreetype.cmake:  /usr/local/X11
/opt/local/share/cmake-2.6/Modules/FindGIF.cmake:  /usr/local
/opt/local/share/cmake-2.6/Modules/FindGTK.cmake:    /usr/local/include/glib12
/opt/local/share/cmake-2.6/Modules/FindGTK.cmake:    /usr/local/lib/glib/include
/opt/local/share/cmake-2.6/Modules/FindITK-3.12.cmake:    /usr/local/lib/InsightToolkit
/opt/local/share/cmake-2.6/Modules/FindITK.cmake:    /usr/local/lib/InsightToolkit
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:  /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:  /usr/local/lib/java/jre/lib/i386
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:  /usr/local/share/java/jre/lib/i386
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:  /usr/local/lib/java/jre/lib/amd64
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:  /usr/local/share/java/jre/lib/amd64
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:  /usr/local/lib/java/jre/lib/ppc
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:  /usr/local/share/java/jre/lib/ppc
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:  /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:  /usr/local/lib/java/include
/opt/local/share/cmake-2.6/Modules/FindJNI.cmake:  /usr/local/share/java/include
/opt/local/share/cmake-2.6/Modules/FindJava.cmake:  /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindJava.cmake:  /usr/local/java/bin
/opt/local/share/cmake-2.6/Modules/FindJava.cmake:  /usr/local/java/share/bin
/opt/local/share/cmake-2.6/Modules/FindKDE3.cmake:  /usr/local/include/kde
/opt/local/share/cmake-2.6/Modules/FindLAPACK.cmake:    PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH
/opt/local/share/cmake-2.6/Modules/FindLAPACK.cmake:    PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH
/opt/local/share/cmake-2.6/Modules/FindLua50.cmake:  /usr/local
/opt/local/share/cmake-2.6/Modules/FindLua50.cmake:  /usr/local
/opt/local/share/cmake-2.6/Modules/FindLua50.cmake:    /usr/local
/opt/local/share/cmake-2.6/Modules/FindLua51.cmake:  /usr/local
/opt/local/share/cmake-2.6/Modules/FindLua51.cmake:  /usr/local
/opt/local/share/cmake-2.6/Modules/FindMPEG.cmake:  /usr/local/livid
/opt/local/share/cmake-2.6/Modules/FindMPEG.cmake:  /usr/local/livid/mpeg2dec/libmpeg2/.libs
/opt/local/share/cmake-2.6/Modules/FindMPEG.cmake:  /usr/local/livid/mpeg2dec/libvo/.libs
/opt/local/share/cmake-2.6/Modules/FindMPEG2.cmake:  /usr/local/livid
/opt/local/share/cmake-2.6/Modules/FindMPEG2.cmake:  /usr/local/livid/mpeg2dec/libmpeg2/.libs
/opt/local/share/cmake-2.6/Modules/FindMPEG2.cmake:  /usr/local/livid/mpeg2dec/libvo/.libs
/opt/local/share/cmake-2.6/Modules/FindMPI.cmake:    /usr/local/include 
/opt/local/share/cmake-2.6/Modules/FindMPI.cmake:    /usr/local/mpi/include
/opt/local/share/cmake-2.6/Modules/FindMPI.cmake:    PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib
/opt/local/share/cmake-2.6/Modules/FindMPI.cmake:    PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib
/opt/local/share/cmake-2.6/Modules/FindMatlab.cmake:      /usr/local/matlab-7sp1/bin/glnx86/
/opt/local/share/cmake-2.6/Modules/FindMatlab.cmake:      /usr/local/matlab-7sp1/bin/glnxa64/
/opt/local/share/cmake-2.6/Modules/FindMatlab.cmake:    "/usr/local/matlab-7sp1/extern/include/"
/opt/local/share/cmake-2.6/Modules/FindOpenAL.cmake:  /usr/local
/opt/local/share/cmake-2.6/Modules/FindOpenAL.cmake:  /usr/local
/opt/local/share/cmake-2.6/Modules/FindPHP4.cmake:  /usr/local/include/php4
/opt/local/share/cmake-2.6/Modules/FindPHP4.cmake:  /usr/local/include/php
/opt/local/share/cmake-2.6/Modules/FindPHP4.cmake:  /usr/local/apache/php
/opt/local/share/cmake-2.6/Modules/FindPNG.cmake:  /usr/local/include/libpng             # OpenBSD
/opt/local/share/cmake-2.6/Modules/FindPhysFS.cmake:  /usr/local
/opt/local/share/cmake-2.6/Modules/FindPhysFS.cmake:  /usr/local
/opt/local/share/cmake-2.6/Modules/FindPike.cmake:  /usr/local/include/pike/*)
/opt/local/share/cmake-2.6/Modules/FindProducer.cmake:    /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindProducer.cmake:  /usr/local
/opt/local/share/cmake-2.6/Modules/FindQt.cmake:FILE(GLOB GLOB_TEMP_VAR /usr/local/qt-x11-commercial-3*/bin/qmake)
/opt/local/share/cmake-2.6/Modules/FindQt.cmake:FILE(GLOB GLOB_TEMP_VAR /usr/local/qt-x11-commercial-4*/bin/qmake)
/opt/local/share/cmake-2.6/Modules/FindQt.cmake:FILE(GLOB GLOB_TEMP_VAR /usr/local/Trolltech/Qt-4*/bin/qmake)
/opt/local/share/cmake-2.6/Modules/FindQt.cmake:  /usr/local/qt/include/Qt
/opt/local/share/cmake-2.6/Modules/FindQt.cmake:  /usr/local/include/Qt
/opt/local/share/cmake-2.6/Modules/FindQt.cmake:  /usr/local/qt/include
/opt/local/share/cmake-2.6/Modules/FindQt.cmake:  /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindQt3.cmake:  /usr/local/qt/include
/opt/local/share/cmake-2.6/Modules/FindQt3.cmake:    /usr/local/qt/lib
/opt/local/share/cmake-2.6/Modules/FindQt3.cmake:    /usr/local/qt/lib
/opt/local/share/cmake-2.6/Modules/FindQt3.cmake:  /usr/local/qt/lib
/opt/local/share/cmake-2.6/Modules/FindQt3.cmake:  /usr/local/qt/bin
/opt/local/share/cmake-2.6/Modules/FindQt3.cmake:  /usr/local/qt/bin
/opt/local/share/cmake-2.6/Modules/FindSDL.cmake:  /usr/local/include/SDL
/opt/local/share/cmake-2.6/Modules/FindSDL.cmake:  /usr/local/include/SDL12
/opt/local/share/cmake-2.6/Modules/FindSDL.cmake:  /usr/local/include/SDL11 # FreeBSD ports
/opt/local/share/cmake-2.6/Modules/FindSDL.cmake:  /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindSDL.cmake:  /usr/local
/opt/local/share/cmake-2.6/Modules/FindSDL.cmake:      /usr/local
/opt/local/share/cmake-2.6/Modules/FindSDL_image.cmake:  /usr/local/include/SDL
/opt/local/share/cmake-2.6/Modules/FindSDL_image.cmake:  /usr/local/include/SDL12
/opt/local/share/cmake-2.6/Modules/FindSDL_image.cmake:  /usr/local/include/SDL11 # FreeBSD ports
/opt/local/share/cmake-2.6/Modules/FindSDL_image.cmake:  /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindSDL_image.cmake:  /usr/local
/opt/local/share/cmake-2.6/Modules/FindSDL_mixer.cmake:  /usr/local/include/SDL
/opt/local/share/cmake-2.6/Modules/FindSDL_mixer.cmake:  /usr/local/include/SDL12
/opt/local/share/cmake-2.6/Modules/FindSDL_mixer.cmake:  /usr/local/include/SDL11 # FreeBSD ports
/opt/local/share/cmake-2.6/Modules/FindSDL_mixer.cmake:  /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindSDL_mixer.cmake:  /usr/local
/opt/local/share/cmake-2.6/Modules/FindSDL_net.cmake:  /usr/local/include/SDL
/opt/local/share/cmake-2.6/Modules/FindSDL_net.cmake:  /usr/local/include/SDL12
/opt/local/share/cmake-2.6/Modules/FindSDL_net.cmake:  /usr/local/include/SDL11 # FreeBSD ports
/opt/local/share/cmake-2.6/Modules/FindSDL_net.cmake:  /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindSDL_net.cmake:  /usr/local
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:  /usr/local/include/SDL
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:  /usr/local/include/SDL12
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:  /usr/local/include/SDL11 # FreeBSD ports
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:  /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:  /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:         /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:         /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:         /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:         /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:         /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:         /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:         /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_sound.cmake:           /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindSDL_ttf.cmake:  /usr/local/include/SDL
/opt/local/share/cmake-2.6/Modules/FindSDL_ttf.cmake:  /usr/local/include/SDL12
/opt/local/share/cmake-2.6/Modules/FindSDL_ttf.cmake:  /usr/local/include/SDL11 # FreeBSD ports
/opt/local/share/cmake-2.6/Modules/FindSDL_ttf.cmake:  /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindSDL_ttf.cmake:  /usr/local
/opt/local/share/cmake-2.6/Modules/FindSelfPackers.cmake:  /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindSelfPackers.cmake:  /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindSquish.cmake:    #/usr/local/squish
/opt/local/share/cmake-2.6/Modules/FindTCL.cmake:  /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindTCL.cmake:  /usr/local/include
/opt/local/share/cmake-2.6/Modules/FindTclStub.cmake:  /usr/local/lib
/opt/local/share/cmake-2.6/Modules/FindUnixCommands.cmake:  /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindUnixCommands.cmake:  /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindUnixCommands.cmake:  /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindUnixCommands.cmake:  /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindUnixCommands.cmake:  /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindUnixCommands.cmake:  /usr/local/bin
/opt/local/share/cmake-2.6/Modules/FindVTK.cmake:    /usr/local/lib/vtk
/opt/local/share/cmake-2.6/Modules/GetPrerequisites.cmake:    "/usr/local/bin"

Please see the post-destroot phase for my cmake Portfile at:

https://trac.macports.org/browser/users/dweber/devel/cmake/Portfile

There are some reinplace commands that *add* the MacPorts /opt/local prefix to the VTK and ITK cmake modules. Those modifications could be abstracted into a foreach loop that runs over most, if not all, of the modules listed above. When the MacPorts $prefix is added to the search path with the right precedence, this simple solution could fix this problem for all ports in MacPorts. The cmake port is the right place to make this change.

If I get time, I will see about testing further modifications that will modify all the module .cmake files listed above. There may be some specific requirements for particular ports, where they use install paths that are not simply a replacement of /usr/local/ for /opt/local/.

Darren

comment:7 Changed 15 years ago by dweber@…

Description: modified (diff)

comment:8 Changed 15 years ago by dweber@…

Apologies in advance for the length of this comment, but it's mostly file listings to document what would change if the following is included in the post-destroot phase of the cmake port:

post-destroot {
    # ...
    # Experiment to change the prefix in all .cmake files
    set usrPrefix /usr/local
    set macPrefix ${prefix}
    set cmakeFiles [glob ${destroot}${prefix}/share/cmake-${branch}/Modules/*.cmake]
    foreach f ${cmakeFiles} {
        reinplace "s|${usrPrefix}|${macPrefix}|g" ${f}
    }
}

The results of this search and replace and fairly predictable in terms of how the tcl code is working (see detailed diff listing attached), but perhaps a little less predictable in terms of whether or not cmake builds would be successful without any search paths for /usr/local/. If there is nothing to build against in the Apple search paths and nothing below ${prefix}, the user may need to set a specific path in their CmakeLists files or make a custom modification to a module and put that in their project. For most MacPorts, the preference is probably to build against another port in the system before other options. It may be better to not just replace /usr/local with ${prefix}, but rather find a way to add ${prefix} in a proper way to every location where /usr/local is given, such that ${prefix} will have precedence over other items in the cmake search. I found a way to achieve this for ITK and VTK in the Portfile linked in prior comments.

[ dweber@ ~/tmp ]$ cp -rf /opt/local/share/cmake-2.6/Modules cmakeMods

[ dweber@ ~/tmp ]$ grep ".*/usr/local.*" cmakeMods/*.cmake

cmakeMods/CMakeDetermineJavaCompiler.cmake:    /usr/local/bin
cmakeMods/CMakeDetermineJavaCompiler.cmake:    /usr/local/java/bin
cmakeMods/CMakeDetermineSystem.cmake:  FIND_PROGRAM(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
cmakeMods/CMakeGenericSystem.cmake:  SET(CMAKE_INSTALL_PREFIX "/usr/local"
cmakeMods/FindAVIFile.cmake:    /usr/local/avifile/include
cmakeMods/FindAVIFile.cmake:    /usr/local/include/avifile
cmakeMods/FindAVIFile.cmake:    /usr/local/avifile/lib
cmakeMods/FindAVIFile.cmake:    /usr/local/lib
cmakeMods/FindBLAS.cmake:    PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH
cmakeMods/FindBLAS.cmake:    PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH
cmakeMods/FindFLTK.cmake:    /usr/local/lib/fltk
cmakeMods/FindFLTK.cmake:    /usr/local/include
cmakeMods/FindFLTK.cmake:    /usr/local/fltk
cmakeMods/FindFLTK.cmake:      /usr/local/fltk
cmakeMods/FindFLTK.cmake:      /usr/local/fltk/lib
cmakeMods/FindFLTK2.cmake:    /usr/local/lib/fltk2
cmakeMods/FindFLTK2.cmake:    /usr/local/include
cmakeMods/FindFLTK2.cmake:    /usr/local/fltk2
cmakeMods/FindFLTK2.cmake:      /usr/local/include
cmakeMods/FindFLTK2.cmake:      /usr/local/fltk2
cmakeMods/FindFLTK2.cmake:      /usr/local/lib
cmakeMods/FindFLTK2.cmake:      /usr/local/fltk2/lib
cmakeMods/FindFreetype.cmake:  /usr/local/X11R6/include
cmakeMods/FindFreetype.cmake:  /usr/local/X11/include
cmakeMods/FindFreetype.cmake:  /usr/local/X11R6/include
cmakeMods/FindFreetype.cmake:  /usr/local/X11/include
cmakeMods/FindFreetype.cmake:  /usr/local/X11R6
cmakeMods/FindFreetype.cmake:  /usr/local/X11
cmakeMods/FindGIF.cmake:  /usr/local
cmakeMods/FindGTK.cmake:    /usr/local/include/glib12
cmakeMods/FindGTK.cmake:    /usr/local/lib/glib/include
cmakeMods/FindITK.cmake:    /usr/local/lib/InsightToolkit
cmakeMods/FindJNI.cmake:  /usr/local/lib
cmakeMods/FindJNI.cmake:  /usr/local/lib/java/jre/lib/i386
cmakeMods/FindJNI.cmake:  /usr/local/share/java/jre/lib/i386
cmakeMods/FindJNI.cmake:  /usr/local/lib/java/jre/lib/amd64
cmakeMods/FindJNI.cmake:  /usr/local/share/java/jre/lib/amd64
cmakeMods/FindJNI.cmake:  /usr/local/lib/java/jre/lib/ppc
cmakeMods/FindJNI.cmake:  /usr/local/share/java/jre/lib/ppc
cmakeMods/FindJNI.cmake:  /usr/local/include
cmakeMods/FindJNI.cmake:  /usr/local/lib/java/include
cmakeMods/FindJNI.cmake:  /usr/local/share/java/include
cmakeMods/FindJava.cmake:  /usr/local/bin
cmakeMods/FindJava.cmake:  /usr/local/java/bin
cmakeMods/FindJava.cmake:  /usr/local/java/share/bin
cmakeMods/FindKDE3.cmake:  /usr/local/include/kde
cmakeMods/FindLAPACK.cmake:    PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH
cmakeMods/FindLAPACK.cmake:    PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH
cmakeMods/FindLua50.cmake:  /usr/local
cmakeMods/FindLua50.cmake:  /usr/local
cmakeMods/FindLua50.cmake:    /usr/local
cmakeMods/FindLua51.cmake:  /usr/local
cmakeMods/FindLua51.cmake:  /usr/local
cmakeMods/FindMPEG.cmake:  /usr/local/livid
cmakeMods/FindMPEG.cmake:  /usr/local/livid/mpeg2dec/libmpeg2/.libs
cmakeMods/FindMPEG.cmake:  /usr/local/livid/mpeg2dec/libvo/.libs
cmakeMods/FindMPEG2.cmake:  /usr/local/livid
cmakeMods/FindMPEG2.cmake:  /usr/local/livid/mpeg2dec/libmpeg2/.libs
cmakeMods/FindMPEG2.cmake:  /usr/local/livid/mpeg2dec/libvo/.libs
cmakeMods/FindMPI.cmake:    /usr/local/include 
cmakeMods/FindMPI.cmake:    /usr/local/mpi/include
cmakeMods/FindMPI.cmake:    PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib
cmakeMods/FindMPI.cmake:    PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib
cmakeMods/FindMatlab.cmake:      /usr/local/matlab-7sp1/bin/glnx86/
cmakeMods/FindMatlab.cmake:      /usr/local/matlab-7sp1/bin/glnxa64/
cmakeMods/FindMatlab.cmake:    "/usr/local/matlab-7sp1/extern/include/"
cmakeMods/FindOpenAL.cmake:  /usr/local
cmakeMods/FindOpenAL.cmake:  /usr/local
cmakeMods/FindPHP4.cmake:  /usr/local/include/php4
cmakeMods/FindPHP4.cmake:  /usr/local/include/php
cmakeMods/FindPHP4.cmake:  /usr/local/apache/php
cmakeMods/FindPNG.cmake:  /usr/local/include/libpng             # OpenBSD
cmakeMods/FindPhysFS.cmake:  /usr/local
cmakeMods/FindPhysFS.cmake:  /usr/local
cmakeMods/FindPike.cmake:  /usr/local/include/pike/*)
cmakeMods/FindProducer.cmake:    /usr/local/include
cmakeMods/FindProducer.cmake:  /usr/local
cmakeMods/FindQt.cmake:FILE(GLOB GLOB_TEMP_VAR /usr/local/qt-x11-commercial-3*/bin/qmake)
cmakeMods/FindQt.cmake:FILE(GLOB GLOB_TEMP_VAR /usr/local/qt-x11-commercial-4*/bin/qmake)
cmakeMods/FindQt.cmake:FILE(GLOB GLOB_TEMP_VAR /usr/local/Trolltech/Qt-4*/bin/qmake)
cmakeMods/FindQt.cmake:  /usr/local/qt/include/Qt
cmakeMods/FindQt.cmake:  /usr/local/include/Qt
cmakeMods/FindQt.cmake:  /usr/local/qt/include
cmakeMods/FindQt.cmake:  /usr/local/include
cmakeMods/FindQt3.cmake:  /usr/local/qt/include
cmakeMods/FindQt3.cmake:    /usr/local/qt/lib
cmakeMods/FindQt3.cmake:    /usr/local/qt/lib
cmakeMods/FindQt3.cmake:  /usr/local/qt/lib
cmakeMods/FindQt3.cmake:  /usr/local/qt/bin
cmakeMods/FindQt3.cmake:  /usr/local/qt/bin
cmakeMods/FindSDL.cmake:  /usr/local/include/SDL
cmakeMods/FindSDL.cmake:  /usr/local/include/SDL12
cmakeMods/FindSDL.cmake:  /usr/local/include/SDL11 # FreeBSD ports
cmakeMods/FindSDL.cmake:  /usr/local/include
cmakeMods/FindSDL.cmake:  /usr/local
cmakeMods/FindSDL.cmake:      /usr/local
cmakeMods/FindSDL_image.cmake:  /usr/local/include/SDL
cmakeMods/FindSDL_image.cmake:  /usr/local/include/SDL12
cmakeMods/FindSDL_image.cmake:  /usr/local/include/SDL11 # FreeBSD ports
cmakeMods/FindSDL_image.cmake:  /usr/local/include
cmakeMods/FindSDL_image.cmake:  /usr/local
cmakeMods/FindSDL_mixer.cmake:  /usr/local/include/SDL
cmakeMods/FindSDL_mixer.cmake:  /usr/local/include/SDL12
cmakeMods/FindSDL_mixer.cmake:  /usr/local/include/SDL11 # FreeBSD ports
cmakeMods/FindSDL_mixer.cmake:  /usr/local/include
cmakeMods/FindSDL_mixer.cmake:  /usr/local
cmakeMods/FindSDL_net.cmake:  /usr/local/include/SDL
cmakeMods/FindSDL_net.cmake:  /usr/local/include/SDL12
cmakeMods/FindSDL_net.cmake:  /usr/local/include/SDL11 # FreeBSD ports
cmakeMods/FindSDL_net.cmake:  /usr/local/include
cmakeMods/FindSDL_net.cmake:  /usr/local
cmakeMods/FindSDL_sound.cmake:  /usr/local/include/SDL
cmakeMods/FindSDL_sound.cmake:  /usr/local/include/SDL12
cmakeMods/FindSDL_sound.cmake:  /usr/local/include/SDL11 # FreeBSD ports
cmakeMods/FindSDL_sound.cmake:  /usr/local/include
cmakeMods/FindSDL_sound.cmake:  /usr/local/lib
cmakeMods/FindSDL_sound.cmake:         /usr/local/lib
cmakeMods/FindSDL_sound.cmake:         /usr/local/lib
cmakeMods/FindSDL_sound.cmake:         /usr/local/lib
cmakeMods/FindSDL_sound.cmake:         /usr/local/lib
cmakeMods/FindSDL_sound.cmake:         /usr/local/lib
cmakeMods/FindSDL_sound.cmake:         /usr/local/lib
cmakeMods/FindSDL_sound.cmake:         /usr/local/lib
cmakeMods/FindSDL_sound.cmake:           /usr/local/lib
cmakeMods/FindSDL_ttf.cmake:  /usr/local/include/SDL
cmakeMods/FindSDL_ttf.cmake:  /usr/local/include/SDL12
cmakeMods/FindSDL_ttf.cmake:  /usr/local/include/SDL11 # FreeBSD ports
cmakeMods/FindSDL_ttf.cmake:  /usr/local/include
cmakeMods/FindSDL_ttf.cmake:  /usr/local
cmakeMods/FindSelfPackers.cmake:  /usr/local/bin
cmakeMods/FindSelfPackers.cmake:  /usr/local/bin
cmakeMods/FindSquish.cmake:    #/usr/local/squish
cmakeMods/FindTCL.cmake:  /usr/local/lib
cmakeMods/FindTCL.cmake:  /usr/local/include
cmakeMods/FindTclStub.cmake:  /usr/local/lib
cmakeMods/FindUnixCommands.cmake:  /usr/local/bin
cmakeMods/FindUnixCommands.cmake:  /usr/local/bin
cmakeMods/FindUnixCommands.cmake:  /usr/local/bin
cmakeMods/FindUnixCommands.cmake:  /usr/local/bin
cmakeMods/FindUnixCommands.cmake:  /usr/local/bin
cmakeMods/FindUnixCommands.cmake:  /usr/local/bin
cmakeMods/FindVTK.cmake:    /usr/local/lib/vtk
cmakeMods/GetPrerequisites.cmake:    "/usr/local/bin"

[ dweber@X ~/tmp ]$ grep ".*/usr/local.*" cmakeMods/*.cmake

[ dweber@X ~/tmp ]$ grep ".*/opt/local.*" cmakeMods/*.cmake

cmakeMods/CMakeDetermineJavaCompiler.cmake:    /opt/local/bin
cmakeMods/CMakeDetermineJavaCompiler.cmake:    /opt/local/java/bin
cmakeMods/CMakeDetermineSystem.cmake:  FIND_PROGRAM(CMAKE_UNAME uname /bin /usr/bin /opt/local/bin )
cmakeMods/CMakeGenericSystem.cmake:  SET(CMAKE_INSTALL_PREFIX "/opt/local"
cmakeMods/FindAVIFile.cmake:    /opt/local/avifile/include
cmakeMods/FindAVIFile.cmake:    /opt/local/include/avifile
cmakeMods/FindAVIFile.cmake:    /opt/local/avifile/lib
cmakeMods/FindAVIFile.cmake:    /opt/local/lib
cmakeMods/FindBLAS.cmake:    PATHS /opt/local/lib /usr/lib /opt/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH
cmakeMods/FindBLAS.cmake:    PATHS /opt/local/lib /usr/lib /opt/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH
cmakeMods/FindFLTK.cmake:    /opt/local/lib/fltk
cmakeMods/FindFLTK.cmake:    /opt/local/include
cmakeMods/FindFLTK.cmake:    /opt/local/fltk
cmakeMods/FindFLTK.cmake:      /opt/local/fltk
cmakeMods/FindFLTK.cmake:      /opt/local/fltk/lib
cmakeMods/FindFLTK2.cmake:    /opt/local/lib/fltk2
cmakeMods/FindFLTK2.cmake:    /opt/local/include
cmakeMods/FindFLTK2.cmake:    /opt/local/fltk2
cmakeMods/FindFLTK2.cmake:      /opt/local/include
cmakeMods/FindFLTK2.cmake:      /opt/local/fltk2
cmakeMods/FindFLTK2.cmake:      /opt/local/lib
cmakeMods/FindFLTK2.cmake:      /opt/local/fltk2/lib
cmakeMods/FindFreetype.cmake:  /opt/local/X11R6/include
cmakeMods/FindFreetype.cmake:  /opt/local/X11/include
cmakeMods/FindFreetype.cmake:  /opt/local/include
cmakeMods/FindFreetype.cmake:  /opt/local/X11R6/include
cmakeMods/FindFreetype.cmake:  /opt/local/X11/include
cmakeMods/FindFreetype.cmake:  /opt/local/include
cmakeMods/FindFreetype.cmake:  /opt/local/X11R6
cmakeMods/FindFreetype.cmake:  /opt/local/X11
cmakeMods/FindGDAL.cmake:      /opt/local # DarwinPorts
cmakeMods/FindGDAL.cmake:            /opt/local # DarwinPorts
cmakeMods/FindGDAL.cmake:    /opt/local
cmakeMods/FindGIF.cmake:  /opt/local
cmakeMods/FindGIF.cmake:  /opt/local
cmakeMods/FindGTK.cmake:    /opt/local/include/glib12
cmakeMods/FindGTK.cmake:    /opt/local/lib/glib/include
cmakeMods/FindITK.cmake:    /opt/local/lib/InsightToolkit
cmakeMods/FindJNI.cmake:  /opt/local/lib
cmakeMods/FindJNI.cmake:  /opt/local/lib/java/jre/lib/i386
cmakeMods/FindJNI.cmake:  /opt/local/share/java/jre/lib/i386
cmakeMods/FindJNI.cmake:  /opt/local/lib/java/jre/lib/amd64
cmakeMods/FindJNI.cmake:  /opt/local/share/java/jre/lib/amd64
cmakeMods/FindJNI.cmake:  /opt/local/lib/java/jre/lib/ppc
cmakeMods/FindJNI.cmake:  /opt/local/share/java/jre/lib/ppc
cmakeMods/FindJNI.cmake:  /opt/local/include
cmakeMods/FindJNI.cmake:  /opt/local/lib/java/include
cmakeMods/FindJNI.cmake:  /opt/local/share/java/include
cmakeMods/FindJava.cmake:  /opt/local/bin
cmakeMods/FindJava.cmake:  /opt/local/java/bin
cmakeMods/FindJava.cmake:  /opt/local/java/share/bin
cmakeMods/FindKDE3.cmake:  /opt/local/include/kde
cmakeMods/FindLAPACK.cmake:    PATHS /opt/local/lib /usr/lib /opt/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH
cmakeMods/FindLAPACK.cmake:    PATHS /opt/local/lib /usr/lib /opt/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH
cmakeMods/FindLua50.cmake:  /opt/local
cmakeMods/FindLua50.cmake:  /opt/local # DarwinPorts
cmakeMods/FindLua50.cmake:  /opt/local
cmakeMods/FindLua50.cmake:  /opt/local
cmakeMods/FindLua50.cmake:    /opt/local
cmakeMods/FindLua50.cmake:    /opt/local
cmakeMods/FindLua51.cmake:  /opt/local
cmakeMods/FindLua51.cmake:  /opt/local # DarwinPorts
cmakeMods/FindLua51.cmake:  /opt/local
cmakeMods/FindLua51.cmake:  /opt/local
cmakeMods/FindMPEG.cmake:  /opt/local/livid
cmakeMods/FindMPEG.cmake:  /opt/local/livid/mpeg2dec/libmpeg2/.libs
cmakeMods/FindMPEG.cmake:  /opt/local/livid/mpeg2dec/libvo/.libs
cmakeMods/FindMPEG2.cmake:  /opt/local/livid
cmakeMods/FindMPEG2.cmake:  /opt/local/livid/mpeg2dec/libmpeg2/.libs
cmakeMods/FindMPEG2.cmake:  /opt/local/livid/mpeg2dec/libvo/.libs
cmakeMods/FindMPI.cmake:    /opt/local/include 
cmakeMods/FindMPI.cmake:    /opt/local/mpi/include
cmakeMods/FindMPI.cmake:    PATHS /usr/lib /opt/local/lib /opt/local/mpi/lib
cmakeMods/FindMPI.cmake:    PATHS /usr/lib /opt/local/lib /opt/local/mpi/lib
cmakeMods/FindMatlab.cmake:      /opt/local/matlab-7sp1/bin/glnx86/
cmakeMods/FindMatlab.cmake:      /opt/local/matlab-7sp1/bin/glnxa64/
cmakeMods/FindMatlab.cmake:    "/opt/local/matlab-7sp1/extern/include/"
cmakeMods/FindOpenAL.cmake:  /opt/local
cmakeMods/FindOpenAL.cmake:  /opt/local # DarwinPorts
cmakeMods/FindOpenAL.cmake:  /opt/local
cmakeMods/FindOpenAL.cmake:  /opt/local
cmakeMods/FindOpenThreads.cmake:        /opt/local # DarwinPorts
cmakeMods/FindOpenThreads.cmake:        /opt/local
cmakeMods/FindOpenThreads.cmake:        /opt/local
cmakeMods/FindPHP4.cmake:  /opt/local/include/php4
cmakeMods/FindPHP4.cmake:  /opt/local/include/php
cmakeMods/FindPHP4.cmake:  /opt/local/apache/php
cmakeMods/FindPNG.cmake:  /opt/local/include/libpng             # OpenBSD
cmakeMods/FindPhysFS.cmake:  /opt/local
cmakeMods/FindPhysFS.cmake:  /opt/local # DarwinPorts
cmakeMods/FindPhysFS.cmake:  /opt/local
cmakeMods/FindPhysFS.cmake:  /opt/local
cmakeMods/FindPike.cmake:  /opt/local/include/pike/*)
cmakeMods/FindProducer.cmake:    /opt/local/include
cmakeMods/FindProducer.cmake:    /opt/local/include # DarwinPorts
cmakeMods/FindProducer.cmake:  /opt/local
cmakeMods/FindProducer.cmake:  /opt/local
cmakeMods/FindQt.cmake:FILE(GLOB GLOB_TEMP_VAR /opt/local/qt-x11-commercial-3*/bin/qmake)
cmakeMods/FindQt.cmake:FILE(GLOB GLOB_TEMP_VAR /opt/local/qt-x11-commercial-4*/bin/qmake)
cmakeMods/FindQt.cmake:FILE(GLOB GLOB_TEMP_VAR /opt/local/Trolltech/Qt-4*/bin/qmake)
cmakeMods/FindQt.cmake:  /opt/local/qt/include/Qt
cmakeMods/FindQt.cmake:  /opt/local/include/Qt
cmakeMods/FindQt.cmake:  /opt/local/qt/include
cmakeMods/FindQt.cmake:  /opt/local/include
cmakeMods/FindQt3.cmake:  /opt/local/qt/include
cmakeMods/FindQt3.cmake:    /opt/local/qt/lib
cmakeMods/FindQt3.cmake:    /opt/local/qt/lib
cmakeMods/FindQt3.cmake:  /opt/local/qt/lib
cmakeMods/FindQt3.cmake:  /opt/local/qt/bin
cmakeMods/FindQt3.cmake:  /opt/local/qt/bin
cmakeMods/FindSDL.cmake:  /opt/local/include/SDL
cmakeMods/FindSDL.cmake:  /opt/local/include/SDL12
cmakeMods/FindSDL.cmake:  /opt/local/include/SDL11 # FreeBSD ports
cmakeMods/FindSDL.cmake:  /opt/local/include
cmakeMods/FindSDL.cmake:  /opt/local/include/SDL # DarwinPorts
cmakeMods/FindSDL.cmake:  /opt/local/include
cmakeMods/FindSDL.cmake:  /opt/local
cmakeMods/FindSDL.cmake:  /opt/local
cmakeMods/FindSDL.cmake:      /opt/local
cmakeMods/FindSDL.cmake:      /opt/local
cmakeMods/FindSDL_image.cmake:  /opt/local/include/SDL
cmakeMods/FindSDL_image.cmake:  /opt/local/include/SDL12
cmakeMods/FindSDL_image.cmake:  /opt/local/include/SDL11 # FreeBSD ports
cmakeMods/FindSDL_image.cmake:  /opt/local/include
cmakeMods/FindSDL_image.cmake:  /opt/local/include/SDL # DarwinPorts
cmakeMods/FindSDL_image.cmake:  /opt/local/include
cmakeMods/FindSDL_image.cmake:  /opt/local
cmakeMods/FindSDL_image.cmake:  /opt/local
cmakeMods/FindSDL_mixer.cmake:  /opt/local/include/SDL
cmakeMods/FindSDL_mixer.cmake:  /opt/local/include/SDL12
cmakeMods/FindSDL_mixer.cmake:  /opt/local/include/SDL11 # FreeBSD ports
cmakeMods/FindSDL_mixer.cmake:  /opt/local/include
cmakeMods/FindSDL_mixer.cmake:  /opt/local/include/SDL # DarwinPorts
cmakeMods/FindSDL_mixer.cmake:  /opt/local/include
cmakeMods/FindSDL_mixer.cmake:  /opt/local
cmakeMods/FindSDL_mixer.cmake:  /opt/local
cmakeMods/FindSDL_net.cmake:  /opt/local/include/SDL
cmakeMods/FindSDL_net.cmake:  /opt/local/include/SDL12
cmakeMods/FindSDL_net.cmake:  /opt/local/include/SDL11 # FreeBSD ports
cmakeMods/FindSDL_net.cmake:  /opt/local/include
cmakeMods/FindSDL_net.cmake:  /opt/local/include/SDL # DarwinPorts
cmakeMods/FindSDL_net.cmake:  /opt/local/include
cmakeMods/FindSDL_net.cmake:  /opt/local
cmakeMods/FindSDL_net.cmake:  /opt/local
cmakeMods/FindSDL_sound.cmake:  /opt/local/include/SDL
cmakeMods/FindSDL_sound.cmake:  /opt/local/include/SDL12
cmakeMods/FindSDL_sound.cmake:  /opt/local/include/SDL11 # FreeBSD ports
cmakeMods/FindSDL_sound.cmake:  /opt/local/include
cmakeMods/FindSDL_sound.cmake:  /opt/local/include/SDL # DarwinPorts
cmakeMods/FindSDL_sound.cmake:  /opt/local/include
cmakeMods/FindSDL_sound.cmake:  /opt/local/lib
cmakeMods/FindSDL_sound.cmake:  /opt/local/lib
cmakeMods/FindSDL_sound.cmake:         /opt/local/lib
cmakeMods/FindSDL_sound.cmake:         /opt/local/lib
cmakeMods/FindSDL_sound.cmake:         /opt/local/lib
cmakeMods/FindSDL_sound.cmake:         /opt/local/lib
cmakeMods/FindSDL_sound.cmake:         /opt/local/lib
cmakeMods/FindSDL_sound.cmake:         /opt/local/lib
cmakeMods/FindSDL_sound.cmake:         /opt/local/lib
cmakeMods/FindSDL_sound.cmake:         /opt/local/lib
cmakeMods/FindSDL_sound.cmake:         /opt/local/lib
cmakeMods/FindSDL_sound.cmake:         /opt/local/lib
cmakeMods/FindSDL_sound.cmake:         /opt/local/lib
cmakeMods/FindSDL_sound.cmake:         /opt/local/lib
cmakeMods/FindSDL_sound.cmake:         /opt/local/lib
cmakeMods/FindSDL_sound.cmake:         /opt/local/lib
cmakeMods/FindSDL_sound.cmake:           /opt/local/lib
cmakeMods/FindSDL_sound.cmake:           /opt/local/lib
cmakeMods/FindSDL_ttf.cmake:  /opt/local/include/SDL
cmakeMods/FindSDL_ttf.cmake:  /opt/local/include/SDL12
cmakeMods/FindSDL_ttf.cmake:  /opt/local/include/SDL11 # FreeBSD ports
cmakeMods/FindSDL_ttf.cmake:  /opt/local/include
cmakeMods/FindSDL_ttf.cmake:  /opt/local/include/SDL # DarwinPorts
cmakeMods/FindSDL_ttf.cmake:  /opt/local/include
cmakeMods/FindSDL_ttf.cmake:  /opt/local
cmakeMods/FindSDL_ttf.cmake:  /opt/local
cmakeMods/FindSelfPackers.cmake:  /opt/local/bin
cmakeMods/FindSelfPackers.cmake:  /opt/local/bin
cmakeMods/FindSquish.cmake:    #/opt/local/squish
cmakeMods/FindTCL.cmake:  /opt/local/lib
cmakeMods/FindTCL.cmake:  /opt/local/include
cmakeMods/FindTclStub.cmake:  /opt/local/lib
cmakeMods/FindUnixCommands.cmake:  /opt/local/bin
cmakeMods/FindUnixCommands.cmake:  /opt/local/bin
cmakeMods/FindUnixCommands.cmake:  /opt/local/bin
cmakeMods/FindUnixCommands.cmake:  /opt/local/bin
cmakeMods/FindUnixCommands.cmake:  /opt/local/bin
cmakeMods/FindUnixCommands.cmake:  /opt/local/bin
cmakeMods/FindVTK.cmake:    /opt/local/lib/vtk
cmakeMods/FindWrapITK.cmake:  "/opt/local/lib/InsightToolkit-3.12/WrapITK"
cmakeMods/Findosg_functions.cmake:            /opt/local # DarwinPorts
cmakeMods/Findosg_functions.cmake:            /opt/local # DarwinPorts
cmakeMods/Findosg_functions.cmake:            /opt/local # DarwinPorts
cmakeMods/GetPrerequisites.cmake:    "/opt/local/bin"

Changed 15 years ago by dweber@…

Attachment: cmakeMods.txt added

diff -u on prefix changes to cmake module files

comment:9 Changed 15 years ago by cssdev

According to this CMake bug, the modules should include /opt/local already. Maybe we should report upstream which modules don't include the MacPorts path? Maybe check for files containing /usr/local/ that don't include /opt/local? Each file we change places the onus of support on MacPorts.

The goal is to allow any MacPort installation to rely on cmake modules to pick up other MacPort libraries automatically, and in preference (with precedence) to anything similar installed outside of ${prefix} on the system.

I hope to avoid the need to track down future bugs in the MacPorts-installed CMake modules, as CMake includes documented ways to set additional paths. If you set a $CMAKE_PREFIX_PATH environment variable to /opt/local, does that work without the need to create so many modifications?

comment:10 Changed 15 years ago 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

comment:11 Changed 14 years ago by cssdev

I believe this is fixed upstream in CMake 2.8.3 (2.8.3-rc1 to be exact).

comment:12 Changed 13 years ago by jmroot (Joshua Root)

Cc: css@… removed
Resolution: fixed
Status: assignedclosed

Closing as per comment:11.

Note: See TracTickets for help on using tickets.