[PATCH] Fix libc++ header install on darwin.
Jean-Daniel Dupas
devlists at shadowlab.org
Fri Nov 8 02:44:16 PST 2013
Hi howard.hinnant,
On darwin, clang looks for libc++ headers in 'lib/c++/v1' and not in 'include/c++/v1' like on other OSes.
This patch update the libc++ CMake build system to install the libc++ headers at the right place on darwin.
http://llvm-reviews.chandlerc.com/D2122
Files:
CMakeLists.txt
lib/CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -71,6 +71,12 @@
)
set(LIBCXX_TARGET_TRIPLE ${LIBCXX_TARGET_TRIPLE} CACHE STRING "Target triple.")
+if ( APPLE )
+ set(LIBCXX_HEADERS_INSTALL_DIR lib)
+else()
+ set(LIBCXX_HEADERS_INSTALL_DIR include)
+endif()
+
#===============================================================================
# Add an ABI library if appropriate
#===============================================================================
@@ -127,7 +133,7 @@
set(LIBCXX_CXX_ABI_DEPS abilib_headers)
include_directories("${CMAKE_BINARY_DIR}/include")
install(DIRECTORY "${CMAKE_BINARY_DIR}/include/"
- DESTINATION include/c++/v1
+ DESTINATION ${LIBCXX_HEADERS_INSTALL_DIR}/c++/v1
FILES_MATCHING
PATTERN "*"
)
Index: lib/CMakeLists.txt
===================================================================
--- lib/CMakeLists.txt
+++ lib/CMakeLists.txt
@@ -106,7 +106,7 @@
endif()
install(DIRECTORY ../include/
- DESTINATION include/c++/v1
+ DESTINATION ${LIBCXX_HEADERS_INSTALL_DIR}/c++/v1
FILES_MATCHING
PATTERN "*"
PATTERN ".svn" EXCLUDE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2122.1.patch
Type: text/x-patch
Size: 1193 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131108/adbeb860/attachment.bin>
More information about the cfe-commits
mailing list