Dont required CMake 3 to install a linker script
authorEric Fiselier <eric@efcs.ca>
Thu, 22 Oct 2015 21:24:01 +0000 (21:24 +0000)
committerEric Fiselier <eric@efcs.ca>
Thu, 22 Oct 2015 21:24:01 +0000 (21:24 +0000)
llvm-svn: 251065

libcxx/lib/CMakeLists.txt

index ec3085b..cdba053 100644 (file)
@@ -154,7 +154,6 @@ if (LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
   )
 endif()
 
-
 if (LIBCXX_INSTALL_LIBRARY)
   install(TARGETS cxx
     LIBRARY DESTINATION lib${LIBCXX_LIBDIR_SUFFIX} COMPONENT libcxx
@@ -163,7 +162,9 @@ if (LIBCXX_INSTALL_LIBRARY)
   # NOTE: This install command must go after the cxx install command otherwise
   # it will not be executed after the library symlinks are installed.
   if (LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
-    install(FILES "$<TARGET_LINKER_FILE:cxx>"
+    # Replace the libc++ filename with $<TARGET_LINKER_FILE:cxx>
+    # after we required CMake 3.0.
+    install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libc++${CMAKE_SHARED_LIBRARY_SUFFIX}"
       DESTINATION lib${LIBCXX_LIBDIR_SUFFIX}
       COMPONENT libcxx)
   endif()