diff options
-rwxr-xr-x | bootstrap-cmake.sh | 2 | ||||
-rw-r--r-- | configserver/CMakeLists.txt | 27 | ||||
-rw-r--r-- | controller-api/CMakeLists.txt | 1 | ||||
-rw-r--r-- | functions.cmake | 16 |
4 files changed, 31 insertions, 15 deletions
diff --git a/bootstrap-cmake.sh b/bootstrap-cmake.sh index 8f6bf953e6f..4352c8b9c0a 100755 --- a/bootstrap-cmake.sh +++ b/bootstrap-cmake.sh @@ -23,7 +23,7 @@ while getopts "uh" opt; do done shift $((OPTIND-1)) -if [[ $# -eq 0 ]]; then +if [[ $# -eq 0 ]]; then SOURCE_DIR=$(dirname "$0") EXTRA_CMAKE_ARGS="" elif [[ $# -eq 1 ]]; then diff --git a/configserver/CMakeLists.txt b/configserver/CMakeLists.txt index accc313dcae..4c98ca64847 100644 --- a/configserver/CMakeLists.txt +++ b/configserver/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -install_fat_java_artifact(configserver) +install_configserver_component(configserver) vespa_install_script(src/main/sh/vespa-configserver-remove-state bin) vespa_install_script(src/main/sh/ping-configserver libexec/vespa) @@ -10,16 +10,15 @@ vespa_install_script(src/main/sh/stop-configserver libexec/vespa) install(DIRECTORY src/main/resources/logd DESTINATION conf) install(DIRECTORY src/main/resources/configserver-app DESTINATION conf) -install(CODE "execute_process(COMMAND mkdir -p \$ENV{DESTDIR}/\${CMAKE_INSTALL_PREFIX}/conf/configserver-app/components)") -install(CODE "execute_process(COMMAND mkdir -p \$ENV{DESTDIR}/\${CMAKE_INSTALL_PREFIX}/conf/configserver-app/config-models)") -install(CODE "execute_process(COMMAND ln -snf \${CMAKE_INSTALL_PREFIX}/lib/jars/athenz-identity-provider-service-jar-with-dependencies.jar \$ENV{DESTDIR}/\${CMAKE_INSTALL_PREFIX}/conf/configserver-app/components/athenz-identity-provider-service.jar)") -install(CODE "execute_process(COMMAND ln -snf \${CMAKE_INSTALL_PREFIX}/lib/jars/config-model-fat.jar \$ENV{DESTDIR}/\${CMAKE_INSTALL_PREFIX}/conf/configserver-app/components/config-model-fat.jar)") -install(CODE "execute_process(COMMAND ln -snf \${CMAKE_INSTALL_PREFIX}/lib/jars/configserver-jar-with-dependencies.jar \$ENV{DESTDIR}/\${CMAKE_INSTALL_PREFIX}/conf/configserver-app/components/configserver.jar)") -install(CODE "execute_process(COMMAND ln -snf \${CMAKE_INSTALL_PREFIX}/lib/jars/configserver-flags-jar-with-dependencies.jar \$ENV{DESTDIR}/\${CMAKE_INSTALL_PREFIX}/conf/configserver-app/components/configserver-flags.jar)") -install(CODE "execute_process(COMMAND ln -snf \${CMAKE_INSTALL_PREFIX}/lib/jars/flags-jar-with-dependencies.jar \$ENV{DESTDIR}/\${CMAKE_INSTALL_PREFIX}/conf/configserver-app/components/flags.jar)") -install(CODE "execute_process(COMMAND ln -snf \${CMAKE_INSTALL_PREFIX}/lib/jars/orchestrator-jar-with-dependencies.jar \$ENV{DESTDIR}/\${CMAKE_INSTALL_PREFIX}/conf/configserver-app/components/orchestrator.jar)") -install(CODE "execute_process(COMMAND ln -snf \${CMAKE_INSTALL_PREFIX}/lib/jars/service-monitor-jar-with-dependencies.jar \$ENV{DESTDIR}/\${CMAKE_INSTALL_PREFIX}/conf/configserver-app/components/service-monitor.jar)") -install(CODE "execute_process(COMMAND ln -snf \${CMAKE_INSTALL_PREFIX}/lib/jars/application-model-jar-with-dependencies.jar \$ENV{DESTDIR}/\${CMAKE_INSTALL_PREFIX}/conf/configserver-app/components/application-model.jar)") -install(CODE "execute_process(COMMAND ln -snf \${CMAKE_INSTALL_PREFIX}/lib/jars/node-repository-jar-with-dependencies.jar \$ENV{DESTDIR}/\${CMAKE_INSTALL_PREFIX}/conf/configserver-app/components/node-repository.jar)") -install(CODE "execute_process(COMMAND ln -snf \${CMAKE_INSTALL_PREFIX}/lib/jars/zkfacade-jar-with-dependencies.jar \$ENV{DESTDIR}/\${CMAKE_INSTALL_PREFIX}/conf/configserver-app/components/zkfacade.jar)") -install(CODE "execute_process(COMMAND ln -snf \${CMAKE_INSTALL_PREFIX}/conf/configserver-app/components \$ENV{DESTDIR}/\${CMAKE_INSTALL_PREFIX}/lib/jars/config-models)") +install(DIRECTORY DESTINATION conf/configserver-app/components) +install(DIRECTORY DESTINATION conf/configserver-app/config-models) +install_symlink(lib/jars/athenz-identity-provider-service-jar-with-dependencies.jar conf/configserver-app/components/athenz-identity-provider-service.jar) +install_symlink(lib/jars/config-model-fat.jar conf/configserver-app/components/config-model-fat.jar) +install_symlink(lib/jars/configserver-flags-jar-with-dependencies.jar conf/configserver-app/components/configserver-flags.jar) +install_symlink(lib/jars/flags-jar-with-dependencies.jar conf/configserver-app/components/flags.jar) +install_symlink(lib/jars/orchestrator-jar-with-dependencies.jar conf/configserver-app/components/orchestrator.jar) +install_symlink(lib/jars/service-monitor-jar-with-dependencies.jar conf/configserver-app/components/service-monitor.jar) +install_symlink(lib/jars/application-model-jar-with-dependencies.jar conf/configserver-app/components/application-model.jar) +install_symlink(lib/jars/node-repository-jar-with-dependencies.jar conf/configserver-app/components/node-repository.jar) +install_symlink(lib/jars/zkfacade-jar-with-dependencies.jar conf/configserver-app/components/zkfacade.jar) +install_symlink(conf/configserver-app/components lib/jars/config-models) diff --git a/controller-api/CMakeLists.txt b/controller-api/CMakeLists.txt new file mode 100644 index 00000000000..ea02292d1eb --- /dev/null +++ b/controller-api/CMakeLists.txt @@ -0,0 +1 @@ +install_configserver_component(controller-api) diff --git a/functions.cmake b/functions.cmake index bfb4c945c16..2b460c8c5ea 100644 --- a/functions.cmake +++ b/functions.cmake @@ -566,6 +566,22 @@ function(install_symlink TARGET LINK) install_absolute_symlink(${CMAKE_INSTALL_PREFIX}/${TARGET} ${LINK}) endfunction(install_symlink) +function(install_configserver_component NAME) + cmake_parse_arguments( + PARAM + "" + "CLASSIFIER" + "" + ${ARGN} + ) + if(NOT PARAM_CLASSIFIER) + SET(PARAM_CLASSIFIER "jar-with-dependencies") + endif() + install(FILES "target/${NAME}-${PARAM_CLASSIFIER}.jar" DESTINATION lib/jars/) + install(DIRECTORY DESTINATION conf/configserver-app/components) + install_symlink(lib/jars/${NAME}-${PARAM_CLASSIFIER}.jar conf/configserver-app/components/${NAME}.jar) +endfunction() + function(add_extra_projects) if(EXTRA_PROJECTS) foreach(PROJECT ${EXTRA_PROJECTS}) |