- Moved invocation script
- Added invocation script to installation process
This commit is contained in:
@@ -2,6 +2,6 @@
|
||||
|
||||
BloomInstallationDir=@BLOOM_INSTALLATION_PREFIX@
|
||||
|
||||
LD_LIBRARY_PATH=$BloomInstallationDir/lib:$LD_LIBRARY_PATH;
|
||||
LD_LIBRARY_PATH=@BLOOM_SHARED_LIBRARY_PATHS@:$LD_LIBRARY_PATH;
|
||||
export LD_LIBRARY_PATH;
|
||||
exec $BloomInstallationDir/bin/bloom "$@";
|
||||
@@ -4,6 +4,30 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX "/opt/bloom" CACHE PATH "..." FORCE)
|
||||
endif()
|
||||
|
||||
set(BLOOM_INSTALLATION_PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set(BLOOM_SHARED_LIBRARY_PATHS "")
|
||||
|
||||
# If any path prefixes passed to CMAKE contain a lib directory, include it in our invocation script (LD_LIBRARY_PATH)
|
||||
foreach(LIB_PATH ${CMAKE_PREFIX_PATH})
|
||||
if(EXISTS "${LIB_PATH}/lib")
|
||||
list(APPEND BLOOM_SHARED_LIBRARY_PATHS "${LIB_PATH}/lib")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
list(
|
||||
JOIN
|
||||
BLOOM_SHARED_LIBRARY_PATHS
|
||||
":"
|
||||
BLOOM_SHARED_LIBRARY_PATHS
|
||||
)
|
||||
|
||||
# Generate Bloom's invocation script
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/build/distributed/bloom.sh.in"
|
||||
"${CMAKE_BINARY_DIR}/bloom.sh"
|
||||
@ONLY
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS Bloom
|
||||
DESTINATION "./bin"
|
||||
@@ -13,6 +37,15 @@ install(
|
||||
WORLD_EXECUTE WORLD_READ
|
||||
)
|
||||
|
||||
install(
|
||||
FILES ${CMAKE_BINARY_DIR}/bloom.sh
|
||||
DESTINATION "./bin"
|
||||
PERMISSIONS
|
||||
OWNER_EXECUTE OWNER_READ OWNER_WRITE
|
||||
GROUP_EXECUTE GROUP_READ
|
||||
WORLD_EXECUTE WORLD_READ
|
||||
)
|
||||
|
||||
install(
|
||||
DIRECTORY ${CMAKE_BINARY_DIR}/resources
|
||||
DESTINATION "./"
|
||||
|
||||
@@ -5,13 +5,14 @@ set(BLOOM_PACKAGE_CONTACT "Nav Mohammed <support@bloom.oscillate.io>")
|
||||
|
||||
# All generated packages will install Bloom to BLOOM_INSTALLATION_PREFIX
|
||||
set(BLOOM_INSTALLATION_PREFIX "/opt/bloom")
|
||||
set(BLOOM_SHARED_LIBRARY_PATHS "${BLOOM_INSTALLATION_PREFIX}/lib")
|
||||
|
||||
string(TOLOWER ${BLOOM_PACKAGE_NAME} BLOOM_PACKAGE_NAME_LOWER)
|
||||
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/packaging/pkgbuild")
|
||||
|
||||
# Generate Bloom's invocation script
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/build/packaging/bloom.sh.in"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/build/distributed/bloom.sh.in"
|
||||
"${CMAKE_BINARY_DIR}/packaging/bloom.sh"
|
||||
@ONLY
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user