From 8137c598f7b6f8c2b7010c9d3c3c8e1ee89e205a Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Thu, 14 Mar 2019 11:22:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D0=BE=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=B1=D0=B8=D0=B1=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 --- src/libcmex/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libcmex/CMakeLists.txt b/src/libcmex/CMakeLists.txt index 34c5077..d6a2912 100644 --- a/src/libcmex/CMakeLists.txt +++ b/src/libcmex/CMakeLists.txt @@ -11,7 +11,7 @@ set(current_target_headers cmex.hpp ) -add_common_library(${current_target} ${current_target_sources}) +add_common_library(TARGET ${current_target} SOURCES ${current_target_sources}) common_target_properties(${current_target}) # Цель, используемая только для установки заголовочных файлов без компиляции проекта @@ -22,7 +22,9 @@ add_custom_target(${current_target}-install-headers # Правила для установки install(TARGETS ${current_target}_static ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -install(TARGETS ${current_target}_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +if(BUILD_SHARED_LIBS) + install(TARGETS ${current_target}_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() install(FILES ${CMAKE_BINARY_DIR}/include/config.hpp ${current_target_headers} COMPONENT headers DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${current_target}) install(FILES ${CMAKE_BINARY_DIR}/${current_target}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)