From a27d3e6d58a1581ae1d9711565f1b47d68fd938e Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Sat, 11 Apr 2020 13:24:46 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6?= =?UTF-8?q?=D0=BA=D0=B0=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B8=20=D0=BF?= =?UTF-8?q?=D0=B0=D0=BA=D0=B5=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmake/cmlib | 2 +- cmake/doc | 2 +- src/cmlib-example/CMakeLists.txt | 27 ++++++++------------------- 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/cmake/cmlib b/cmake/cmlib index 7cd6a65..026655f 160000 --- a/cmake/cmlib +++ b/cmake/cmlib @@ -1 +1 @@ -Subproject commit 7cd6a6514eda2548988c9dc0a8a8280d5e03ac90 +Subproject commit 026655f7121203f5a51db10c44178bf5b4bcf713 diff --git a/cmake/doc b/cmake/doc index 30b457b..62d017b 160000 --- a/cmake/doc +++ b/cmake/doc @@ -1 +1 @@ -Subproject commit 30b457bbc4b0948e78556507336f455547384ab6 +Subproject commit 62d017b2e976df437afb27716b910ad66333ca06 diff --git a/src/cmlib-example/CMakeLists.txt b/src/cmlib-example/CMakeLists.txt index 94ff1c4..5f19ec9 100644 --- a/src/cmlib-example/CMakeLists.txt +++ b/src/cmlib-example/CMakeLists.txt @@ -2,12 +2,10 @@ set(TRGT cmlib-example) # Список файлов исходных текстов -set(TRGT_sources - ${CMAKE_CURRENT_SOURCE_DIR}/init.cpp) +set(TRGT_sources ${CMAKE_CURRENT_SOURCE_DIR}/init.cpp) # Список заголовочных файлов (используется для установки) -set(TRGT_headers - ${CMAKE_CURRENT_SOURCE_DIR}/init.hpp) +set(TRGT_headers ${CMAKE_CURRENT_SOURCE_DIR}/init.hpp) # Функция для создания цели, результатом которой будет сборка библиотеки add_common_library(TARGET ${TRGT} SOURCES ${TRGT_sources}) @@ -18,28 +16,19 @@ target_include_directories(${TRGT} SYSTEM PUBLIC ${Boost_INCLUDE_DIRS}) # Цель, используемая только для установки # заголовочных файлов без компиляции проекта -add_custom_target( - ${TRGT}-install-headers - COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=headers -P - "${CMAKE_BINARY_DIR}/cmake_install.cmake") +add_custom_target(${TRGT}-install-headers COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=DEV -P + "${CMAKE_BINARY_DIR}/cmake_install.cmake") # Установка статической библиотеки -install(TARGETS ${TRGT}_static - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install(TARGETS ${TRGT}_static COMPONENT DEV ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) # Установка динамической библиотеки if(BUILD_SHARED_LIBS) - install(TARGETS ${TRGT}_shared - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(TARGETS ${TRGT}_shared COMPONENT DEV LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() # Установка заголовочных файлов -install( - FILES ${TRGT_headers} - COMPONENT headers - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${current_target}) +install(FILES ${TRGT_headers} COMPONENT DEV DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${TRGT}) # Установка файла для pkg-config -install(FILES ${CMAKE_BINARY_DIR}/${TRGT}.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - +install(FILES ${CMAKE_BINARY_DIR}/${TRGT}.pc COMPONENT DEV DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)