Closed GoogleCodeExporter closed 8 years ago
Are you certain about thay? Can you give references please?
If you have find_package(libproxy) in a CMakeLists.txt, and it can't be found
you get this text:
CMake Warning at CMakeLists.txt:1 (find_package):
Could not find module Findlibproxy.cmake or a configuration file for
package libproxy.
Adjust CMAKE_MODULE_PATH to find Findlibproxy.cmake or set libproxy_DIR to
the directory containing a CMake configuration file for libproxy. The file
will have one of the following names:
libproxyConfig.cmake
libproxy-config.cmake
=> Could not find module Findlibproxy.cmake or a configuration file for package
libproxy.
It seems not really to matter... and I'm not aware of any 'policy' around this
(but I'm also no big guru in reading the cmake doc :) )
Other than that, the patch looks ok.
Original comment by dominiqu...@gmail.com
on 6 Jun 2011 at 9:50
Well, I cannot find any policy neither. But looking at others projects like
phonon, polkit-qt, soprano, strigi, vigra, opencv, avogadro and more none of
these install its cmake module in cmake/Modules, but instead in a dedicaded dir.
I'll ask cmake developers about this and I'll let you know.
Original comment by bash.lnx@gmail.com
on 6 Jun 2011 at 9:54
I was right. They said your project never should install something in
/usr/share/cmake/Modules, but you should provide a $project-Config.cmake file
how is described here:
http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_fi
le
Original comment by bash.lnx@gmail.com
on 7 Jun 2011 at 7:14
Thanks for checking.
Original comment by dominiqu...@gmail.com
on 8 Jun 2011 at 9:52
This is not convincing yet:
> A CMakeLists.txt with only this line:
find_package(FooBar)
> then straceing cmake to check what files called FoorBar* are accessed:
read(3, "find_package(FooBar)\n", 8192) = 21
access("/usr/share/cmake/Modules/FindFooBar.cmake", R_OK) = -1 ENOENT (No such
file or directory)
open("/home/dle1gis/.cmake/packages/FooBar",
O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or
directory)
access("/home/dle1gis/FooBarConfig.cmake", R_OK) = -1 ENOENT (No such file or
directory)
access("/usr/local/FooBarConfig.cmake", R_OK) = -1 ENOENT (No such file or
directory)
access("/usr/FooBarConfig.cmake", R_OK) = -1 ENOENT (No such file or directory)
access("/FooBarConfig.cmake", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/X11/FooBarConfig.cmake", R_OK) = -1 ENOENT (No such file or
directory)
access("/usr/bin/X11/cmake/FooBarConfig.cmake", R_OK) = -1 ENOTDIR (Not a
directory)
access("/usr/X11R6/FooBarConfig.cmake", R_OK) = -1 ENOENT (No such file or
directory)
access("/usr/games/FooBarConfig.cmake", R_OK) = -1 ENOENT (No such file or
directory)
access("/usr/lib64/jvm/jre/FooBarConfig.cmake", R_OK) = -1 ENOENT (No such file
or directory)
access("/usr/lib/mit/FooBarConfig.cmake", R_OK) = -1 ENOENT (No such file or
directory)
==> Neither /usr/share/FooBar/FooBar-config.cmake (as it should be as per the
linked wiki page) nor /usr/lib/cmake/FooBar.cmake (as defined in your initial
post)
are being accessed and verified
So far it still seemd FindFooBar.cmake is the best name and the install in
/usr/share/cmake/Modules.
Original comment by dominiqu...@gmail.com
on 11 Jun 2011 at 10:15
This is the conversation I had with Pino Toscano (a KDE developer):
<bash`> Does anyone knows the policy about custom cmake modules? I mean, if my
project provides a FindProject.cmake module, where I should install it? In
/usr/share/cmake/Modules or /usr/share/cmake-2.8/Modules or
/usr/lib/cmake/$Project or where? Thanks
<pinotree> nowhere
<pinotree> you should provide a ProjectConfig.cmake file in $prefix/lib/cmake
<bash`> pinotree: thanks, can you link me to the policy page?
<pinotree> http://www.cmake.org/Wiki/CMake/Tutorials#CMake_Packages
Original comment by bash.lnx@gmail.com
on 11 Jun 2011 at 10:22
Which still does nit fit what cmake itself is using to find the files (Tested
with cmake 2.8.4).
As such, I have to consider it, at least for now, invalid (until cmake actually
also finds a file where they say it should be installed to). I will keep an eye
on it though.
(http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_f
ile actually uses /usr/share/FooBar/FooBarConfig.cmake as example.. so it
contradicts what the dev says.
Original comment by dominiqu...@gmail.com
on 11 Jun 2011 at 11:03
Original issue reported on code.google.com by
bash.lnx@gmail.com
on 6 Jun 2011 at 9:42Attachments: