summaryrefslogtreecommitdiff
path: root/librabbitmq/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'librabbitmq/CMakeLists.txt')
-rw-r--r--librabbitmq/CMakeLists.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/librabbitmq/CMakeLists.txt b/librabbitmq/CMakeLists.txt
index 1cc58d5..347c992 100644
--- a/librabbitmq/CMakeLists.txt
+++ b/librabbitmq/CMakeLists.txt
@@ -142,10 +142,12 @@ if(BUILD_STATIC_LIBS)
set_target_properties(rabbitmq-static PROPERTIES COMPILE_OPTIONS "/Z7")
endif()
- install(TARGETS rabbitmq-static EXPORT "${targets_export_name}"
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ if(INSTALL_STATIC_LIBS)
+ install(TARGETS rabbitmq-static EXPORT "${targets_export_name}"
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT rabbitmq-c-development
- )
+ )
+ endif()
add_library(rabbitmq::rabbitmq-static ALIAS rabbitmq-static)
endif()