Commit 399e4203 authored by Lisa's avatar Lisa
Browse files

Rules for installing scripts added in cmake

parent f2c74db5
......@@ -2,6 +2,8 @@ project(akabei)
cmake_minimum_required(VERSION 2.6)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
set(DATA_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/akabei" CACHE "Akabei data's install dir" STRING)
set(SCRIPTS_INSTALL_DIR "${DATA_INSTALL_DIR}/python" CACHE "Akabei scripts' install dir" STRING)
# Compiles with debugging symbols (Debug mode)
if (CMAKE_COMPILER_IS_GNUCC)
......
project(akabei)
# Installs the bash completion scripts
install(FILES akabei DESTINATION "/etc/bash_completion.d")
install(FILES pakabei DESTINATION "/etc/bash_completion.d")
# installs the configuration script and creates a symlink to it
install(FILES akabei-conf-import.py
DESTINATION "${SCRIPTS_INSTALL_DIR}"
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SCRIPTS_INSTALL_DIR}/akabei-conf-import.py ${CMAKE_INSTALL_PREFIX}/bin/akabei-conf-import)")
add_subdirectory(akabei-db-import)
\ No newline at end of file
project(akabei)
# installs all the Python files in the same directory
install(DIRECTORY ./
DESTINATION "${SCRIPTS_INSTALL_DIR}/db-import"
FILES_MATCHING PATTERN "*.py"
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
# creates a symbolic link in the bin directory
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SCRIPTS_INSTALL_DIR}/db-import/akabei-db-import.py ${CMAKE_INSTALL_PREFIX}/bin/akabei-db-import)")
\ No newline at end of file
add_subdirectory(akabei-clean-cache)
add_subdirectory(akabei-key)
add_subdirectory(akabei-config)
\ No newline at end of file
project(akabei)
# installs the akabei-config script
install(DIRECTORY ./
DESTINATION "${SCRIPTS_INSTALL_DIR}/config"
FILES_MATCHING PATTERN "*.py"
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
# creates a symbolic link in the bin directory
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SCRIPTS_INSTALL_DIR}/config/akabei-config.py ${CMAKE_INSTALL_PREFIX}/bin/akabei-config)")
\ No newline at end of file
project(akabei)
# installs the akabei-key script
install(FILES akabei-key.py
DESTINATION "${SCRIPTS_INSTALL_DIR}"
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
# creates a symbolic link in the bin directory
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SCRIPTS_INSTALL_DIR}/akabei-key.py ${CMAKE_INSTALL_PREFIX}/bin/akabei-key)")
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment