aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDRC <dcommander@users.sourceforge.net>2011-10-05 09:18:55 +0000
committerDRC <dcommander@users.sourceforge.net>2011-10-05 09:18:55 +0000
commitd000252926e7de93c62937df7cf5cd06cde5e8d7 (patch)
tree6f4efaa530aaa6030a57e874e7e26cefd99634e2
parent2e97b1ac99a1f9924713ef62e287a4b1d42dc716 (diff)
downloadtigervnc-d000252926e7de93c62937df7cf5cd06cde5e8d7.tar.gz
tigervnc-d000252926e7de93c62937df7cf5cd06cde5e8d7.zip
Only sign JAR when it is built
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4703 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r--cmake/SignJar.cmake2
-rw-r--r--java/src/CMakeLists.txt13
2 files changed, 8 insertions, 7 deletions
diff --git a/cmake/SignJar.cmake b/cmake/SignJar.cmake
index 3b0d0c86..abc35ba6 100644
--- a/cmake/SignJar.cmake
+++ b/cmake/SignJar.cmake
@@ -6,6 +6,8 @@ if(NOT JAR_FILE)
message(FATAL_ERROR "JAR_FILE must be defined")
endif()
+message(STATUS "Signing ${JAR_FILE}")
+
set(KEYTOOL "${Java_PATH}/keytool")
set(JARSIGNER "${Java_PATH}/jarsigner")
diff --git a/java/src/CMakeLists.txt b/java/src/CMakeLists.txt
index 7ab9fc67..7048dd91 100644
--- a/java/src/CMakeLists.txt
+++ b/java/src/CMakeLists.txt
@@ -72,6 +72,8 @@ add_custom_command(OUTPUT ${JAVA_BINDIR}/tigervnc.ico
${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
@@ -88,17 +90,14 @@ add_custom_command(OUTPUT VncViewer.jar
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