[CMake] Bugs in cmake-2.4.6, please solve for 2.4.7

Hendrik Sattler post at hendrik-sattler.de
Mon Jul 9 08:59:09 EDT 2007


Hi,

I am currently writing CMakeLists.txt files for an autotools project.
I found several bugs while doing that and I want to share them with you:

1. add_library( foo STATIC EXCLUDE_FROM_ALL foo.c) complains about 
EXCLUDE_FROM_ALL. I found posts about this in the archive, is this solved for 
2.4.7?

2. add_dependencies( foo bar ) only works, if the custom target foo is 
declared in the same subdirectory, the toplevel directory doesn't work.

3. install( TARGET foo ..... OPTIONAL ) always builds foo on "make install" 
although foo is marked as EXCLUDE_FROM_ALL and OPTIONAL should not care if it 
wasn't already built. Work-around for executables is to use
install( PROGRAMS ${foo_EXECUTABLE} ..... OPTIONAL ) instead but that doesn't 
work for libraries (hint: rpath)

4. I copied FindPkgConfig.cmake to use it with 2.4.6 but it misses one small 
feature: a variable with the path (relative to CMAKE_INSTALL_PATH) where to 
install pkgconfig files to. This may have uncommon places although it's 
usually ${prefix}/share/pkgconfig.

5. There is absolutely no information about the component stuff. How can I use 
it or can only cpack do that?

I hope it is possible to solve these issues before 2.4.7.

Thanks

HS


More information about the CMake mailing list