I have a project setup like this: set(OT_HEADERS Headers/ObjectTools/_RawFormat/COFF.h Headers/ObjectTools/Format/COFF.h Headers/ObjectTools/Object.h )
add_library(ObjectTools SHARED ${OT_SOURCES} ${OT_HEADERS} ${OT_RESOURCES}) set_target_properties(ObjectTools PROPERTIES VERSION 0.1.0 SOVERSION 0 RESOURCE "${OT_RESOURCES}" PUBLIC_HEADER "${OT_HEADERS}" FRAMEWORK ${FRAMEWORK}) install(TARGETS ObjectTools ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin FRAMEWORK DESTINATION Library/Frameworks BUNDLE DESTINATION Applications PUBLIC_HEADER DESTINATION include/ObjectTools RESOURCE DESTINATION share/ObjectTools) As you can see, my headers are not laid out in a flat format, and worse, some have the same file names (This is because the Format/ headers wrap the (internal) headers in _RawFormat. The trouble I'm having is that CMake strips all path information when installing the headers resulting in the headers being in the wrong place (and therefore the cross references being broken). I don't see any information in the documentation on how to avoid this from being an issue is it even possible? If its not, perhaps the next release of CMake could include a target property to set the header prefix. Perhaps something like > PUBLIC_HEADER_PREFIX: >> Specifies the prefix to be removed from headers when installing them, or >> copying them to the Headers directory within a Mac OS X bundle. For example, >> if you set this value to "include/MyFramework/", and specify a public header >> named "include/MyFramework/MyHeader.h" will be installed as "MyHeader.h" >> relative to the include path. >> An alternative option would be similar to the above, except CMake will additionally strip the framework's (output) name when building on Mac OS X, since the framework lookup rules will cause the framework name to be automatically re-inserted. Many thanks, -- Owen Shepherd http://www.owenshepherd.net owen.sheph...@e43.eu (general) / oshephe...@shef.ac.uk (academic)
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake