From a52a9e7b8ae93a25dfe037fcecadf8351ac32c7a Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Wed, 22 Apr 2020 19:06:22 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D1=86=D0=B5=D0=BB=D0=B5=D0=B2=D0=BE=D0=B9=20?= =?UTF-8?q?=D0=BA=D0=B0=D1=82=D0=B0=D0=BB=D0=BE=D0=B3=20=D0=B4=D0=BB=D1=8F?= =?UTF-8?q?=20=D1=84=D0=BE=D1=80=D0=BC=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B1=D0=B8=D0=B1=D0=BB=D0=B8=D0=BE=D1=82=D0=B5?= =?UTF-8?q?=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibCommonLibraryTarget.cmake | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/CMLibCommonLibraryTarget.cmake b/CMLibCommonLibraryTarget.cmake index 541d6c2..787cb08 100644 --- a/CMLibCommonLibraryTarget.cmake +++ b/CMLibCommonLibraryTarget.cmake @@ -19,21 +19,22 @@ function(add_common_library target) $ $) set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE ON) + # cmake-format: off if(BUILD_SHARED_LIBS) add_library(${target}_shared SHARED $) - set_target_properties( - ${target}_shared - PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR} OUTPUT_NAME ${OUTNAME} - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_INSTALL_LIBDIR}) + set_target_properties(${target}_shared PROPERTIES OUTPUT_NAME ${OUTNAME} + VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR} + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) install(TARGETS ${target}_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() if(NOT SKIP_STATIC_LIBS) add_library(${target}_static STATIC $) - set_target_properties(${target}_static PROPERTIES OUTPUT_NAME ${OUTNAME} ARCHIVE_OUTPUT_DIRECTORY - ${CMAKE_INSTALL_LIBDIR}) + set_target_properties(${target}_static PROPERTIES OUTPUT_NAME ${OUTNAME} + ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) install(TARGETS ${target}_static ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() + # cmake-format: on configure_file(${CMLIB_MODULE_DIR}/pc/lib.pc.in ${CMAKE_BINARY_DIR}/${target}.pc) install(FILES ${CMAKE_BINARY_DIR}/${target}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)