From f003cc6dcba37e8bbb99ab0d762de03394be9f1f Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Wed, 6 Mar 2019 00:05:25 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BF=D0=B8=D1=81=D0=BE=D0=BA=20=D0=B8?= =?UTF-8?q?=D1=81=D1=85=D0=BE=D0=B4=D0=BD=D1=8B=D1=85=20=D1=84=D0=B0=D0=B9?= =?UTF-8?q?=D0=BB=D0=BE=D0=B2=20=D0=B4=D0=BB=D1=8F=20=D0=BA=D0=BE=D0=BC?= =?UTF-8?q?=D0=BF=D0=B8=D0=BB=D1=8F=D1=86=D0=B8=D0=B8=20=D0=B1=D0=B8=D0=B1?= =?UTF-8?q?=D0=BB=D0=B8=D0=BE=D1=82=D0=B5=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibCommonLibraryTarget.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CMLibCommonLibraryTarget.cmake b/CMLibCommonLibraryTarget.cmake index aff675f..2a7642d 100644 --- a/CMLibCommonLibraryTarget.cmake +++ b/CMLibCommonLibraryTarget.cmake @@ -1,5 +1,13 @@ # Создание статической и динамической библиотеки из одинаковых объектных файлов -function(add_common_library LIBNAME SOURCES) +function(add_common_library) + set(options) + set(oneValueArgs TARGET) + set(multiValueArgs SOURCES) + + cmake_parse_arguments(_LOCAL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + set(LIBNAME ${_LOCAL_TARGET}) + set(SOURCES ${_LOCAL_SOURCES}) + add_library(${LIBNAME} OBJECT ${SOURCES}) target_include_directories( ${LIBNAME}