Цель create_auxilary_symlinks для создания символических ссылок
This commit is contained in:
parent
873e29592c
commit
16665a5a6f
27
CMLibAuxilarySymlinks.cmake
Normal file
27
CMLibAuxilarySymlinks.cmake
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
if(NOT TARGET create_auxilary_symlinks)
|
||||||
|
if(UNIX)
|
||||||
|
add_custom_target(
|
||||||
|
create_auxilary_symlinks
|
||||||
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
|
# Ссылка на каталог с журналами
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LOCALSTATEDIR}/log
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/files/log
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LOCALSTATEDIR}/log/${PROJECT_NAME}
|
||||||
|
# Ссылка на каталог с обрабатываемыми данными
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LOCALSTATEDIR}/lib
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/files/lib
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LOCALSTATEDIR}/lib/${PROJECT_NAME}
|
||||||
|
# Ссылка на каталог с временными данными
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LOCALSTATEDIR}/cache
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/files/cache
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LOCALSTATEDIR}/cache/${PROJECT_NAME}
|
||||||
|
# Ссылка на каталог с постоянными данными
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/files/${CMAKE_INSTALL_DATADIR}
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}
|
||||||
|
# Ссылка на каталог настроек
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_SYSCONFDIR}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/files/${CMAKE_INSTALL_SYSCONFDIR}
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_SYSCONFDIR}/${PROJECT_NAME})
|
||||||
|
endif()
|
||||||
|
endif()
|
@ -43,6 +43,7 @@ include(CMLibDocDoxygen)
|
|||||||
include(CMLibDocBreathe)
|
include(CMLibDocBreathe)
|
||||||
include(CMLibQtTranslation)
|
include(CMLibQtTranslation)
|
||||||
include(CMLibToday)
|
include(CMLibToday)
|
||||||
|
include(CMLibAuxilarySymlinks)
|
||||||
include(CMLibConfigHPPGenerate)
|
include(CMLibConfigHPPGenerate)
|
||||||
include(CMLibCPackSources)
|
include(CMLibCPackSources)
|
||||||
include(CMLibUninstall)
|
include(CMLibUninstall)
|
||||||
|
Loading…
Reference in New Issue
Block a user