summaryrefslogtreecommitdiffstats
path: root/base/ocsp
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/ocsp
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/ocsp')
-rw-r--r--base/ocsp/src/CMakeLists.txt62
1 files changed, 39 insertions, 23 deletions
diff --git a/base/ocsp/src/CMakeLists.txt b/base/ocsp/src/CMakeLists.txt
index 932b4d234..34b1ec4c2 100644
--- a/base/ocsp/src/CMakeLists.txt
+++ b/base/ocsp/src/CMakeLists.txt
@@ -76,31 +76,47 @@ find_file(SYMKEY_JAR
)
-# identify java sources
-set(pki-ocsp_java_SRCS
- com/netscape/ocsp/OCSPResources.java
- com/netscape/ocsp/OCSPAuthority.java
- com/netscape/ocsp/OCSPApplication.java
- com/netscape/ocsp/SigningUnit.java
- com/netscape/ocsp/EOCSPException.java
+# build pki-ocsp
+javac(pki-ocsp-classes
+ SOURCES
+ com/netscape/ocsp/*.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-ocsp-jar
+ CREATE
+ ${CMAKE_BINARY_DIR}/dist/pki-ocsp-${APPLICATION_VERSION}.jar
+ INPUT_DIR
+ ${CMAKE_BINARY_DIR}/classes
+ FILES
+ com/netscape/ocsp/*.class
+ DEPENDS
+ pki-ocsp-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-ocsp
+ SOURCE
+ ${CMAKE_BINARY_DIR}/dist/pki-ocsp.jar
+ DEST
+ pki-ocsp-${APPLICATION_VERSION}.jar
+ DEPENDS
+ pki-ocsp-jar
+)
-# build pki-ocsp.jar
-add_jar(pki-ocsp ${pki-ocsp_java_SRCS})
-add_dependencies(pki-ocsp symkey pki-nsutil pki-cmsutil pki-certsrv pki-cms pki-cmscore)
-install_jar(pki-ocsp ${JAVA_JAR_INSTALL_DIR}/pki)
-set(PKI_OCSP_JAR ${pki-ocsp_JAR_FILE} CACHE INTERNAL "pki-ocsp jar file")
+install(
+ FILES
+ ${CMAKE_BINARY_DIR}/dist/pki-ocsp.jar
+ ${CMAKE_BINARY_DIR}/dist/pki-ocsp-${APPLICATION_VERSION}.jar
+ DESTINATION
+ ${JAVA_JAR_INSTALL_DIR}/pki
+)
+set(PKI_OCSP_JAR ${CMAKE_BINARY_DIR}/dist/pki-ocsp.jar CACHE INTERNAL "pki-ocsp jar file")