[vlc-devel] commit: Fix postproc header detection ( the test depends on inclusion of stdint. h but there is no right way to do that in cmake) ( Rafaël Carré )

Pierre d'Herbemont pdherbemont at free.fr
Sun Mar 9 20:32:58 CET 2008


On Mar 9, 2008, at 7:58 PM, Rafaël Carré wrote:

> On Sun, 2008-03-09 at 19:42 +0100, Pierre d'Herbemont wrote:
>
>> You can do that with like:
>> check_include_files ("stdint.h; libpostproc/postprocess.h"
>> HAVE_LIBPOSTPROC_POSTPROCESS_H)
>>
>> (For next time)
>
> On my tests it would return true if stdint exists and not  
> postprocess.h,
> this is why i went this ugly way

Weird, it works just fine here:

With,
check_include_files ("foo/foo.h;bar/bar.h" HAVE_BAR_BAR_H)

$ cmake --version
cmake version 2.5-20080301

$ tail CMakeFiles/CMakeError.log
Determining if files foo/foo.h;bar/bar.h exist failed with the  
following output
:
Change Dir: /Users/steg/Documents/vlc/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/make "cmTryCompileExec/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/ 
cmTryCom
pileExec.dir/build
/Users/steg/Documents/vlc/extras/contrib/bin/cmake -E  
cmake_progress_report /Us
ers/steg/Documents/vlc/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o
/usr/bin/gcc   -I/Users/steg/Documents/vlc/extras/contrib/include   -o  
CMakeFil
es/cmTryCompileExec.dir/CheckIncludeFiles.c.o   -c /Users/steg/ 
Documents/vlc/bu
ild/CMakeFiles/CMakeTmp/CheckIncludeFiles.c
/Users/steg/Documents/vlc/build/CMakeFiles/CMakeTmp/ 
CheckIncludeFiles.c:2:21: e
rror: foo/foo.h: No such file or directory
/Users/steg/Documents/vlc/build/CMakeFiles/CMakeTmp/ 
CheckIncludeFiles.c:3:21: e
rror: bar/bar.h: No such file or directory
make[2]: *** [CMakeFiles/cmTryCompileExec.dir/CheckIncludeFiles.c.o]  
Error 1
make[1]: *** [cmTryCompileExec/fast] Error 2

Source:
/* */
#include <foo/foo.h>
#include <bar/bar.h>


int main(){return 0;}




More information about the vlc-devel mailing list