summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-07-12 16:53:22 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-07-23 12:44:59 -0500
commit9ead1240301bafea64e791cf59e28e1f74796f5c (patch)
tree147bdc764cea30f0c5733e135304b1f3cf1f1135 /CMakeLists.txt
parentaf66df4e028cac52d75dd5a585a16426083bd5af (diff)
downloadpki-9ead1240301bafea64e791cf59e28e1f74796f5c.tar.gz
pki-9ead1240301bafea64e791cf59e28e1f74796f5c.tar.xz
pki-9ead1240301bafea64e791cf59e28e1f74796f5c.zip
Updated util and common build scripts.
The build scripts for util and common packages have been modified to use the new Java CMake library to automatically find the source codes and build the binaries. Ticket #62
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d6c5d823e..b99211bd4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,8 +64,12 @@ macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source buil
# add macros
include(MacroCopyFile)
+include(Java)
include(UseJava)
+file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/classes)
+file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/dist)
+
# required for all PKI components EXCEPT IPA_PKI_THEME, PKI_RA, and PKI_TPS
if (NOT APPLICATION_FLAVOR_IPA_PKI_THEME AND
NOT APPLICATION_FLAVOR_PKI_RA AND
@@ -125,6 +129,29 @@ add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND}
-P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+# clean-dist target
+add_custom_target(clean-dist
+ COMMAND ${CMAKE_COMMAND}
+ -E remove_directory ${CMAKE_BINARY_DIR}/dist
+)
+
+# clean-cmake target
+add_custom_target(clean-cmake
+ COMMAND ${CMAKE_COMMAND}
+ -E remove_directory ${CMAKE_BINARY_DIR}/base
+ COMMAND ${CMAKE_COMMAND}
+ -E remove_directory ${CMAKE_BINARY_DIR}/CMakeFiles
+ COMMAND ${CMAKE_COMMAND}
+ -E remove -f
+ ${CMAKE_BINARY_DIR}/CMakeCache.txt
+ ${CMAKE_BINARY_DIR}/cmake_install.cmake
+ ${CMAKE_BINARY_DIR}/cmake_uninstall.cmake
+ ${CMAKE_BINARY_DIR}/config.h
+ ${CMAKE_BINARY_DIR}/CPackConfig.cmake
+ ${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake
+ ${CMAKE_BINARY_DIR}/install_manifest.txt
+ ${CMAKE_BINARY_DIR}/Makefile
+)
# check subdirectories
if (APPLICATION_FLAVOR_PKI_CORE OR