I've upgraded my Java project to the latest 2.8.6 release. The only thing
missing for me is to allow components on the install commands.
I just did the following:
In UseJava.cmake (same for INSTALL_JNI_SYMLINK):
function(INSTALL_JAR _TARGET_NAME _DESTINATION)
get_property(__FILES
TARGET
${_TARGET_NAME}
PROPERTY
INSTALL_FILES
)
if (__FILES)
install(
FILES
${__FILES}
DESTINATION
${_DESTINATION}
)
else (__FILES)
message(SEND_ERROR "The target ${_TARGET_NAME} is not known in this
scope.")
endif (__FILES)
endfunction(INSTALL_JAR _TARGET_NAME _DESTINATION)
TO
function(INSTALL_JAR _TARGET_NAME _DESTINATION _COMPONENT)
get_property(__FILES
TARGET
${_TARGET_NAME}
PROPERTY
INSTALL_FILES
)
if (__FILES)
install(
FILES
${__FILES}
DESTINATION
${_DESTINATION}
COMPONENT
${_COMPONENT}
)
else (__FILES)
message(SEND_ERROR "The target ${_TARGET_NAME} is not known in this
scope.")
endif (__FILES)
endfunction(INSTALL_JAR _TARGET_NAME _DESTINATION _COMPONENT)
Allen
--
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