<div dir="ltr">Make sure the headers are part of the library, too, like this:<div><span class="Apple-style-span" style="border-collapse: collapse; ">add_library(${EBML} ${SOURCES} ${HEADERS})</span><br><br></div><div>HTH,</div>
<div>David</div><div><br><div class="gmail_quote">On Sat, Aug 23, 2008 at 11:10 AM, Boris Dušek <span dir="ltr"><<a href="mailto:boris.dusek@gmail.com">boris.dusek@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
I tried to use CMake to generate a framework with one library file and<br>
bunch of public header files, using this code:<br>
<br>
...<br>
add_library(${EBML} ${SOURCES})<br>
set_property(TARGET ${EBML} PROPERTY FRAMEWORK ON)<br>
set_property(TARGET ${EBML} PROPERTY PUBLIC_HEADER ${HEADERS})<br>
...<br>
install(TARGETS ${EBML}<br>
RUNTIME DESTINATION bin<br>
LIBRARY DESTINATION lib<br>
ARCHIVE DESTINATION lib<br>
FRAMEWORK DESTINATION "/Library/Frameworks"<br>
PUBLIC_HEADER DESTINATION include/ebml<br>
)<br>
...<br>
<br>
The resulting framework looked like this:<br>
boris@Pioneer:~$ ls -R /Library/Frameworks/ebml.framework/<br>
Versions ebml<br>
<br>
/Library/Frameworks/ebml.framework//Versions:<br>
0.8.1 Current<br>
<br>
/Library/Frameworks/ebml.framework//Versions/0.8.1:<br>
ebml<br>
<br>
Notice that there are no headers included, as I requested by setting<br>
the PUBLIC_HEADER property of the target properly.<br>
<br>
When I turned the FRAMEWORK property off (simply by commenting out the<br>
line that sets that property), the library installed into<br>
/usr/local/lib and all the headers from PUBLIC_HEADER property of the<br>
target were installed correctly into /usr/local/include/ebml.<br>
<br>
Is there something I am doing wrong? I think there is either bug in<br>
CMake, or in the documentation. I only found this post [1] considering<br>
PUBLIC_HEADER, but it's not the same thing (and it's without answer<br>
anyway).<br>
<br>
While I am at it, is it possible to specify the FRAMEWORK DESTINATION<br>
"without specifying it"? I mean, /Library/Frameworks is pretty much<br>
the only option, why can't I omit that and CMake would figure out that<br>
/Library/Frameworks is the default prefix for frameworks on OS X?<br>
Similar note for RUNTINE, LIBRARY, ARCHIVE - the values I specified<br>
are all standard on UNIX, is it possible to specify them only when I<br>
want to use some non-standard location? (it seems against the purpose<br>
of CMake to hardcode these platform-specific values into<br>
CMakeLists.txt files in each project).<br>
<br>
Thanks,<br>
Boris Dušek<br>
<br>
[1]: <a href="http://www.cmake.org/pipermail/cmake/2008-June/022378.html" target="_blank">http://www.cmake.org/pipermail/cmake/2008-June/022378.html</a><br>
_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a></blockquote></div><br></div></div>