[CMake] Including a header file fails
Enrique Izaguirre
enrique.izaguirre at gmail.com
Tue Mar 1 15:58:15 EST 2011
Hello again,
I tried several ways but I cannot make it work. The only thing I need to do
is to add a folder which contains a windows header file, in order that it be
included in the build.
There must be a simple way to do it. Could you help?
Maybe if you have an example or something similar.
Thanks
Enrique
On Tue, Mar 1, 2011 at 1:20 PM, Enrique Izaguirre <
enrique.izaguirre at gmail.com> wrote:
> Thank you very much. I'll try that.
>
> Best Regards
>
> Enrique
>
>
> On Tue, Mar 1, 2011 at 1:18 PM, John Drescher <drescherjm at gmail.com>wrote:
>
>> On Tue, Mar 1, 2011 at 2:15 PM, Enrique Izaguirre
>> <enrique.izaguirre at gmail.com> wrote:
>> > Sorry, I didn't explain correctly.
>> >
>> > All the source files are in variable ${hostFiles}
>> > and I generated and executable using add_executable (myprj ${hostFiles})
>> > now I need to add the w32api folder from Windows, which has header files
>> > called from one of the source files contained in ${hostFiles} and are
>> > located in
>> >
>> > ${MYPRJ_SOURCE_DIR}/../../../usr/include/w32api
>> >
>> > How can I do this?
>> >
>>
>> You add the appropriate
>>
>> include_directories()
>>
>> command in CMake. If that header requires linking to a Microsoft
>> library then you do add the Microsoft library to the
>> target_link_libraries not the header file.
>>
>> John
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110301/95640f0f/attachment.htm>
More information about the CMake
mailing list