FindMOOS.cmake Hints Don't Search FHS Locations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Goby |
Fix Released
|
Medium
|
toby schneider | ||
1.0 |
Fix Committed
|
Medium
|
toby schneider | ||
2.0 |
Fix Released
|
Medium
|
toby schneider |
Bug Description
The cmake_modules/
To resolve this discrepancy, I suggest adding the following search paths to each HINTS line in FindMOOS.cmake:
/opt/moos-ivp
/opt
Although not in compliance with the FHS, I have seen some administrators preserve the idea of a src/ directory within /opt:
/opt/src/moos-ivp
/opt/src
On the Mac, there is -- by default -- an /opt/local directory that some administrators may use. Iterating on the above, we get:
/opt/local/moos-ivp
/opt/local
/opt/local/
/opt/local/src
Finally, there are the standard search paths for locally installed software:
/usr/local/
/usr/local/src
I have tested the addition of the FHS locations (/opt/moos-ivp and /opt) by adding said directories to each of the five HINTS lines in FindMOOS.cmake and have confirmed that I can successfully locate the MOOS dependencies checked out in /opt/moos-ivp via the goby build scripts.
Changed in goby: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
assignee: | nobody → toby schneider (tes) |
I have written a much better FindMOOS.cmake for the (new) LAMSS project (https:/ /launchpad. net/lamss).
Could you take a look at it and give your opinion (attached)? I've gone to a different style of Find*.cmake scripts. First I find a single component, then find all the rest in the location found by the first.
In the case of MOOS, I find libMOOS.a/so and then find the rest of MOOS from that location. It now searches /opt /opt/local in addition to a few other hard coded guesses, and the Unix system defaults that CMake adds (/usr, /, /usr/local). In all these paths, it looks for the suffix "moos-ivp/ MOOS/MOOSBin" , "MOOS/MOOSBin", "src/moos- ivp/MOOS/ MOOSBin" , or "src/MOOS/MOOSBin" which should cover most of your scenarios.
If that fails, you can also set the MOOS_ROOT_DIR to the path e.g. "/opt/local/MOOS".
For reference, http:// www.cmake. org/cmake/ help/cmake2. 6docs.html# command: find_library explains CMake's search in gory detail.
Advice is welcome.