summaryrefslogtreecommitdiffstats
path: root/base/ca
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/ca
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/ca')
-rw-r--r--base/ca/src/CMakeLists.txt65
1 files changed, 39 insertions, 26 deletions
diff --git a/base/ca/src/CMakeLists.txt b/base/ca/src/CMakeLists.txt
index cd0c352a8..09cea8ac2 100644
--- a/base/ca/src/CMakeLists.txt
+++ b/base/ca/src/CMakeLists.txt
@@ -31,34 +31,47 @@ find_file(JAXRS_API_JAR
/usr/share/java/resteasy
)
-# identify java sources
-set(pki-ca_java_SRCS
- com/netscape/ca/CMSCRLExtensions.java
- com/netscape/ca/CAService.java
- com/netscape/ca/SigningUnit.java
- com/netscape/ca/CRLWithExpiredCerts.java
- com/netscape/ca/CRLIssuingPoint.java
- com/netscape/ca/CAPolicy.java
- com/netscape/ca/CertificateAuthority.java
- com/netscape/ca/CertificateAuthorityApplication.java
+# build pki-ca
+javac(pki-ca-classes
+ SOURCES
+ com/netscape/ca/*.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-ca-jar
+ CREATE
+ ${CMAKE_BINARY_DIR}/dist/pki-ca-${APPLICATION_VERSION}.jar
+ INPUT_DIR
+ ${CMAKE_BINARY_DIR}/classes
+ FILES
+ com/netscape/ca/*.class
+ DEPENDS
+ pki-ca-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-ca
+ SOURCE
+ ${CMAKE_BINARY_DIR}/dist/pki-ca.jar
+ DEST
+ pki-ca-${APPLICATION_VERSION}.jar
+ DEPENDS
+ pki-ca-jar
+)
-# build pki-ca.jar
-add_jar(pki-ca ${pki-ca_java_SRCS})
-add_dependencies(pki-ca symkey pki-nsutil pki-cmsutil pki-certsrv pki-cms pki-cmscore)
-install_jar(pki-ca ${JAVA_JAR_INSTALL_DIR}/pki)
-set(PKI_CA_JAR ${pki-ca_JAR_FILE} CACHE INTERNAL "pki-ca jar file")
+install(
+ FILES
+ ${CMAKE_BINARY_DIR}/dist/pki-ca.jar
+ ${CMAKE_BINARY_DIR}/dist/pki-ca-${APPLICATION_VERSION}.jar
+ DESTINATION
+ ${JAVA_JAR_INSTALL_DIR}/pki
+)
+set(PKI_CA_JAR ${CMAKE_BINARY_DIR}/dist/pki-ca.jar CACHE INTERNAL "pki-ca jar file")