Skip to content
Snippets Groups Projects
Unverified Commit b01e8c69 authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn Committed by GitHub
Browse files

Merge pull request #228 from mirguest/master

Install the built libraries into InstallArea
parents eca85067 f084ba25
No related branches found
Tags v0.2.6
No related merge requests found
...@@ -52,3 +52,15 @@ install(EXPORT ${PROJECT_NAME}Targets ...@@ -52,3 +52,15 @@ install(EXPORT ${PROJECT_NAME}Targets
) )
gaudi_install(CMAKE cmake/${PROJECT_NAME}Config.cmake) gaudi_install(CMAKE cmake/${PROJECT_NAME}Config.cmake)
file(WRITE ${CMAKE_BINARY_DIR}/setup.sh.in
"#!/bin/bash\n"
"# Generated by cmake \n"
"# Following is the extra envvar:\n"
"@RUN_SCRIPT_EXTRA_COMMANDS@"
)
configure_file("${CMAKE_BINARY_DIR}/setup.sh.in" "${CMAKE_BINARY_DIR}/setup.sh"
@ONLY)
install(FILES "${CMAKE_BINARY_DIR}/setup.sh"
DESTINATION ${CMAKE_INSTALL_PREFIX})
...@@ -104,6 +104,10 @@ function run-make() { ...@@ -104,6 +104,10 @@ function run-make() {
cmake --build . cmake --build .
} }
function run-install() {
cmake --install .
}
############################################################################## ##############################################################################
# Parse the command line options # Parse the command line options
############################################################################## ##############################################################################
...@@ -120,3 +124,5 @@ check-working-builddir || exit -1 ...@@ -120,3 +124,5 @@ check-working-builddir || exit -1
run-cmake || exit -1 run-cmake || exit -1
run-make || exit -1 run-make || exit -1
run-install || exit -1
...@@ -86,6 +86,10 @@ function run-make() { ...@@ -86,6 +86,10 @@ function run-make() {
cmake --build . cmake --build .
} }
function run-install() {
cmake --install .
}
############################################################################## ##############################################################################
# Parse the command line options # Parse the command line options
############################################################################## ##############################################################################
...@@ -103,3 +107,5 @@ check-working-builddir || exit -1 ...@@ -103,3 +107,5 @@ check-working-builddir || exit -1
run-cmake || exit -1 run-cmake || exit -1
run-make || exit -1 run-make || exit -1
run-install || exit -1
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
# Author: Tao Lin <lintao@ihep.ac.cn> # Author: Tao Lin <lintao@ihep.ac.cn>
############################################################################## ##############################################################################
THISSCRITDIR=$(dirname $(readlink -e "${BASH_SOURCE[0]}" 2>/dev/null) 2>/dev/null) # Darwin readlink doesnt accept -e
function info:() { function info:() {
echo "INFO: $*" 1>&2 echo "INFO: $*" 1>&2
} }
...@@ -41,6 +43,25 @@ function setup-external() { ...@@ -41,6 +43,25 @@ function setup-external() {
} }
function setup-install-area() {
local installarea=$THISSCRITDIR/InstallArea
if [ ! -d "$installarea" ]; then
return
fi
export PATH=$installarea/bin:$PATH
export LD_LIBRARY_PATH=$installarea/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$installarea/lib:$PYTHONPATH
export PYTHONPATH=$installarea/python:$PYTHONPATH
export ROOT_INCLUDE_PATH=$installarea/include:$ROOT_INCLUDE_PATH
local extrasetupscript=$installarea/setup.sh
if [ -f "$extrasetupscript" ]; then
source $extrasetupscript
fi
info: "Setup CEPCSW: $installarea"
}
############################################################################## ##############################################################################
# Parse the command line options # Parse the command line options
...@@ -54,3 +75,4 @@ fi ...@@ -54,3 +75,4 @@ fi
export CEPCSW_LCG_VERSION export CEPCSW_LCG_VERSION
setup-external setup-external
setup-install-area
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment