[CMake] Including a header file fails
Enrique Izaguirre
enrique.izaguirre at gmail.com
Mon Feb 28 17:55:12 EST 2011
Hello,
I am trying to include a windows header file in my build.
The simplest way I found is to add the following in the main CMakeLists.txt
file:
include_directories ("${MYPRJ_SOURCE_DIR}/../../../usr/include/w32api")
add_library (w32api w32api/winbase.h)
add_executable (myprj ${hostFiles})
target_link_libraries (myprj w32api)
I am working in Cygwin, and my project is in /home/<my-user>/myprj, that's
why I am using
${MYPRJ_SOURCE_DIR}/../../../usr/include/w32api
since "/" is the root in my cygwin system and the file I want is in
/usr/include/w32api
but when running cmake I get the following error:
CMake Error in CMakeLists.txt:
Cannot find source file "winbase.h". Tried extensions .c .C .c++ .cc .cpp
.cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx
I have not been able to find out what is going on. Could you help please?
Best Regards
Enrique
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110228/f4f7286e/attachment.htm>
More information about the CMake
mailing list