myx/MyxCMake/lib/PopulateCMakeBinaryDir.cmake

16 lines
839 B
CMake
Raw Normal View History

2022-10-04 18:02:40 +00:00
include_guard(GLOBAL)
# Создание в каталоге ${CMAKE_BINARY_DIR} стандартных каталогов bin,include,lib,
# а также символических ссылок на каталоги в ${CMAKE_SOURCE_DIR}/files
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/include)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/include)
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
create_symlink("${CMAKE_SOURCE_DIR}/files/etc" "${CMAKE_BINARY_DIR}/etc")
create_symlink("${CMAKE_SOURCE_DIR}/files/log" "${CMAKE_BINARY_DIR}/log")
create_symlink("${CMAKE_SOURCE_DIR}/files/share" "${CMAKE_BINARY_DIR}/share")
create_symlink("${CMAKE_SOURCE_DIR}/files/var" "${CMAKE_BINARY_DIR}/var")