From e90a2d9e7ec05393c29eaa0e01a412d30e5939cf Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Wed, 6 Mar 2019 12:21:55 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D1=87=D0=B8=D1=82=D1=8B=D0=B2=D0=B0?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=BB=D0=B0=D0=B3=20BUILD=5FSTATIC=5FLIBS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibCommonLibraryTarget.cmake | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/CMLibCommonLibraryTarget.cmake b/CMLibCommonLibraryTarget.cmake index 2a7642d..5c78973 100644 --- a/CMLibCommonLibraryTarget.cmake +++ b/CMLibCommonLibraryTarget.cmake @@ -16,13 +16,15 @@ function(add_common_library) $) set_target_properties(${LIBNAME} PROPERTIES POSITION_INDEPENDENT_CODE ON) - add_library(${LIBNAME}_shared SHARED $) - set_target_properties(${LIBNAME}_shared - PROPERTIES - VERSION ${PROJECT_VERSION} - SOVERSION ${PROJECT_VERSION_MAJOR} - OUTPUT_NAME ${LIBNAME} - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_INSTALL_LIBDIR}) + if(BUILD_SHARED_LIBS) + add_library(${LIBNAME}_shared SHARED $) + set_target_properties(${LIBNAME}_shared + PROPERTIES + VERSION ${PROJECT_VERSION} + SOVERSION ${PROJECT_VERSION_MAJOR} + OUTPUT_NAME ${LIBNAME} + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_INSTALL_LIBDIR}) + endif() add_library(${LIBNAME}_static STATIC $) set_target_properties(${LIBNAME}_static