summaryrefslogtreecommitdiffstats
path: root/base/tks
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-08-09 23:55:04 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-08-15 12:02:36 -0500
commitc70859039d60db53a1966f3b1781defd032a4062 (patch)
tree15c0052846b11bbbc2d8f6412d399510c1415f3b /base/tks
parenta513ee42025af8bba22e6efb3e2fe268076fbd28 (diff)
downloadpki-c70859039d60db53a1966f3b1781defd032a4062.tar.gz
pki-c70859039d60db53a1966f3b1781defd032a4062.tar.xz
pki-c70859039d60db53a1966f3b1781defd032a4062.zip
Updated the remaining build scripts.
The remaining build scripts have been updated to automatically find the source codes. Ticket #62
Diffstat (limited to 'base/tks')
-rw-r--r--base/tks/src/CMakeLists.txt59
1 files changed, 39 insertions, 20 deletions
diff --git a/base/tks/src/CMakeLists.txt b/base/tks/src/CMakeLists.txt
index dfd3d5668..10660f511 100644
--- a/base/tks/src/CMakeLists.txt
+++ b/base/tks/src/CMakeLists.txt
@@ -77,28 +77,47 @@ find_file(SYMKEY_JAR
)
-# identify java sources
-set(pki-tks_java_SRCS
- com/netscape/tks/TKSAuthority.java
- com/netscape/tks/TKSApplication.java
+# build pki-tks
+javac(pki-tks-classes
+ SOURCES
+ com/netscape/tks/*.java
+ CLASSPATH
+ ${PKI_CERTSRV_JAR} ${PKI_CMS_JAR} ${PKI_CMSCORE_JAR}
+ ${PKI_CMSUTIL_JAR} ${PKI_NSUTIL_JAR}
+ ${LDAPJDK_JAR} ${JAXRS_API_JAR}
+ ${JSS_JAR} ${COMMONS_CODEC_JAR} ${SYMKEY_JAR}
+ OUTPUT_DIR
+ ${CMAKE_BINARY_DIR}/classes
+ DEPENDS
+ symkey pki-nsutil pki-cmsutil pki-certsrv pki-cms pki-cmscore
)
+jar(pki-tks-jar
+ CREATE
+ ${CMAKE_BINARY_DIR}/dist/pki-tks-${APPLICATION_VERSION}.jar
+ INPUT_DIR
+ ${CMAKE_BINARY_DIR}/classes
+ FILES
+ com/netscape/tks/*.class
+ DEPENDS
+ pki-tks-classes
+)
-# set classpath
-set(CMAKE_JAVA_INCLUDE_PATH
- ${PKI_CERTSRV_JAR} ${PKI_CMS_JAR} ${PKI_CMSCORE_JAR}
- ${PKI_CMSUTIL_JAR} ${PKI_NSUTIL_JAR}
- ${LDAPJDK_JAR} ${JAXRS_API_JAR}
- ${JSS_JAR} ${COMMONS_CODEC_JAR} ${SYMKEY_JAR})
-
-
-# set version
-set(CMAKE_JAVA_TARGET_VERSION ${APPLICATION_VERSION})
-
+link(pki-tks
+ SOURCE
+ ${CMAKE_BINARY_DIR}/dist/pki-tks.jar
+ DEST
+ pki-tks-${APPLICATION_VERSION}.jar
+ DEPENDS
+ pki-tks-jar
+)
-# build pki-tks.jar
-add_jar(pki-tks ${pki-tks_java_SRCS})
-add_dependencies(pki-tks symkey pki-nsutil pki-cmsutil pki-certsrv pki-cms pki-cmscore)
-install_jar(pki-tks ${JAVA_JAR_INSTALL_DIR}/pki)
-set(PKI_TKS_JAR ${pki-tks_JAR_FILE} CACHE INTERNAL "pki-tks jar file")
+install(
+ FILES
+ ${CMAKE_BINARY_DIR}/dist/pki-tks.jar
+ ${CMAKE_BINARY_DIR}/dist/pki-tks-${APPLICATION_VERSION}.jar
+ DESTINATION
+ ${JAVA_JAR_INSTALL_DIR}/pki
+)
+set(PKI_TKS_JAR ${CMAKE_BINARY_DIR}/dist/pki-tks.jar CACHE INTERNAL "pki-tks jar file")