[CMake] Simple function to create a find script
Andrew Hundt
athundt at gmail.com
Thu Jan 23 13:49:44 EST 2014
I have a function that makes simpler to implement a find script for simple
libraries.
mesh_find_package
(
ExampleModule
MODULE_PRETTY_NAME "Example Module - for demonstration purposes only"
INCLUDE_SEARCH_FILE ExampleModule/ExampleClass.hpp
INCLUDE_PATH_HINTS */usr/local/include /opt/local/include*
MODULE_LIBRARIES ExampleModule # this is the name of the
ExampleModule library file without a prefix or extension
LIBRARY_PATH_HINTS /usr/local/lib /opt/local/lib
#DEBUG # uncomment this for extra debug info about searching for
the module files
)
I've included the script and a more complete example below:
- https://gist.github.com/ahundt/8584263
The function would need to be cleaned up and renamed, perhaps to something
like:
- find_package_library_script()
- implement_find_script()
It would be great if a function like this could be added to CMake because
implementing most find scripts would become much easier.
Is there any interest in this functionality?
Cheers!
Andrew Hundt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140123/ab7a6ccd/attachment.html>
More information about the CMake
mailing list