diff options
| author | Stephane Lajoie <dada@typicus.org> | 2017-07-07 22:23:19 -0400 |
|---|---|---|
| committer | Stephane Lajoie <dada@typicus.org> | 2017-07-07 22:23:19 -0400 |
| commit | b5cd10bc66b785fdc385c16cfddc503324ba8e53 (patch) | |
| tree | 06b5dccfea040828ffe7766f763a049710f673b4 | |
| parent | 91a526d0eae8025354c2c9c4029df442d30c0e9e (diff) | |
| download | vcpkg-b5cd10bc66b785fdc385c16cfddc503324ba8e53.tar.gz vcpkg-b5cd10bc66b785fdc385c16cfddc503324ba8e53.zip | |
Use vcpkg_fixup_cmake_targets to move cmake modules in place.
Make sure MCAnalysis directory is empty before removing.
Use file(INSTALL ...) to put licence file in place.
| -rw-r--r-- | ports/llvm/portfile.cmake | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index bd629e0c3..c09b66ff4 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -36,9 +36,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Move cmake modules to correct vcpkg location and remove extra copy -file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/llvm DESTINATION ${CURRENT_PACKAGES_DIR}/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/llvm) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Remove extra copies of include files in debug directory file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -47,9 +46,11 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -# Remove one empty include subdirectory -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/llvm/MC/MCAnalysis) +# Remove one empty include subdirectory if it is indeed empty +file(GLOB MCANALYSISFILES ${CURRENT_PACKAGES_DIR}/include/llvm/MC/MCAnalysis/*) +if(NOT MCANALYSISFILES) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/llvm/MC/MCAnalysis) +endif() # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/llvm) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/llvm/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/llvm/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/llvm RENAME copyright) |
