message(FATAL_ERROR "JAR_FILE must be defined")
endif()
+message(STATUS "Signing ${JAR_FILE}")
+
set(KEYTOOL "${Java_PATH}/keytool")
set(JARSIGNER "${Java_PATH}/jarsigner")
${JAVA_SRCDIR}/tigervnc.ico ${JAVA_BINDIR}/tigervnc.ico
DEPENDS ${JAVA_SRCDIR}/tigervnc.ico)
+string(REGEX REPLACE "jar" "" Java_PATH ${Java_JAR_EXECUTABLE})
+
add_custom_command(OUTPUT VncViewer.jar
DEPENDS ${JAVA_CLASSES_FULL}
${JAVA_SRCDIR}/MANIFEST.MF
com/jcraft/jzlib/*.class
com/tigervnc/vncviewer/tigervnc.png
com/tigervnc/vncviewer/tigervnc.ico
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -DJava_PATH=${Java_PATH}
+ -DJAR_FILE=${CMAKE_CURRENT_BINARY_DIR}/VncViewer.jar
+ -P ${CMAKE_SOURCE_DIR}/cmake/SignJar.cmake
WORKING_DIRECTORY ${OBJDIR})
add_custom_target(java ALL DEPENDS VncViewer.jar)
-string(REGEX REPLACE "jar" "" Java_PATH ${Java_JAR_EXECUTABLE})
-
-add_custom_command(TARGET java POST_BUILD COMMAND
- ${CMAKE_COMMAND} -DJava_PATH=${Java_PATH}
- -DJAR_FILE=${CMAKE_CURRENT_BINARY_DIR}/VncViewer.jar
- -P ${CMAKE_SOURCE_DIR}/cmake/SignJar.cmake)
-
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/VncViewer.jar
${JAVA_SRCDIR}/README