Notes |
|
(0013563)
|
Philip Lowman
|
2008-09-23 23:15
|
|
Petr,
Looks good. I'll point this module out to my coworker for him to try out when he starts messing around with HLA again.
There were a few things I noticed which could use some tweaks before it's checked in.
1. "/usr" and "/usr/local" don't need to be listed in POSSIBLE_DIRS because they will get searched automatically when FIND_LIBRARY gets called (also in the opposite order since the system path on Linux is /usr/local, /usr, /). See the full documentation for FIND_LIBRARY for the gory details on this extremely complex command. =)
2. For the RTI_FOUND, RTI_FIND_REQUIRED stuff, use the FIND_PACKAGE_HANDLE_STANDARD_ARGS helper macro. See any of the CMake modules in 2.6.0 or greater for an example of how to do this.
3. Use RTI_INCLUDE_DIR instead of RTI_INCLUDE (seems to be the going convention)
4. The MARK_AS_ADVANCED() call at the bottom has no effect because you're only marking normal variables as advanced. Only CACHE variables (like RTI_LIBRARY) can be marked as advanced and I would recommend leaving it up to the user of FindRTI if they want to mark RTI_LIBRARY or FEDTIME_LIBRARY as advanced.
5. Is there a reason you're exposing RTI_LIBRARY_DIRS? |
|
|
(0013564)
|
Philip Lowman
|
2008-09-23 23:35
|
|
Sorry, a few other things I noticed
1. Rename POSSIBLE_DIRS to RTI_POSSIBLE_DIRS to lessen the chance of variable collision.
2. In the same light, rename the MESSAGE_QUIETLY macro to RTI_MESSAGE_QUIETLY to avoid macro name collisions. Anywhere you declare a local variable or macro in your Find module you should at the bare minimum preface it with FOO_ where FOO is your module name.
3. What is the reason you need to manipulate CMAKE_FIND_LIBRARY_PREFIXES (just curious)? |
|
|
(0013569)
|
Petr Gotthard
|
2008-09-24 12:16
(edited on: 2008-09-24 12:17) |
|
Thank you, Philip,
1.-4. Fixed.
5. If there was a reason, I don't remember it ;-). Removed.
1.-2. Fixed.
3. Because the prefix under Windows set to "", but the MAK RTI libraries have the "lib" prefix even under Windows.
|
|
|
(0013588)
|
Bill Hoffman
|
2008-09-25 16:53
|
|
|