[PATCH] Fix libc++ header install on darwin.

Jean-Daniel Dupas devlists at shadowlab.org
Thu Nov 14 15:31:55 PST 2013


Ping 

http://llvm-reviews.chandlerc.com/D2122

Le 8 nov. 2013 à 11:44, Jean-Daniel Dupas <devlists at shadowlab.org> a écrit :

> 
> 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
> <D2122.1.patch>

-- Jean-Daniel








More information about the cfe-commits mailing list