Cleanup based on rnk's feedback.
authorChris Bieneman <beanz@apple.com>
Thu, 16 Apr 2015 18:08:33 +0000 (18:08 +0000)
committerChris Bieneman <beanz@apple.com>
Thu, 16 Apr 2015 18:08:33 +0000 (18:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235125 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/AddLLVM.cmake

index 80e4be5..b3fccb0 100644 (file)
@@ -425,23 +425,19 @@ macro(add_llvm_library name)
     if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LTO")
       if(ARG_SHARED OR BUILD_SHARED_LIBS)
         if(WIN32 OR CYGWIN)
     if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LTO")
       if(ARG_SHARED OR BUILD_SHARED_LIBS)
         if(WIN32 OR CYGWIN)
-          install(TARGETS ${name}
-            EXPORT LLVMExports
-            RUNTIME DESTINATION lib${LLVM_LIBDIR_SUFFIX}
-            COMPONENT ${name})
+          set(install_type RUNTIME)
         else()
         else()
-          install(TARGETS ${name}
-            EXPORT LLVMExports
-            LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
-            COMPONENT ${name})
+          set(install_type LIBRARY)
         endif()
       else()
         endif()
       else()
-        install(TARGETS ${name}
-          EXPORT LLVMExports
-          ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
-          COMPONENT ${name})
+        set(install_type ARCHIVE)
       endif()
 
       endif()
 
+      install(TARGETS ${name}
+            EXPORT LLVMExports
+            ${install_type} DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+            COMPONENT ${name})
+
       if (NOT CMAKE_CONFIGURATION_TYPES)
         add_custom_target(install-${name}
                           DEPENDS ${name}
       if (NOT CMAKE_CONFIGURATION_TYPES)
         add_custom_target(install-${name}
                           DEPENDS ${name}