diff options
| author | wangli28 <47812810+wangli28@users.noreply.github.com> | 2019-07-19 15:30:09 +0800 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2019-07-19 00:30:09 -0700 |
| commit | cf9820bb86565fc21b68890749c8954c9cff1778 (patch) | |
| tree | 0c86ad6d97ac9942a7e4690a1e4e0b0846b8d4f0 | |
| parent | 8f77d4fe06ea5ef57f1e8055f84ab2b1de66864e (diff) | |
| download | vcpkg-cf9820bb86565fc21b68890749c8954c9cff1778.tar.gz vcpkg-cf9820bb86565fc21b68890749c8954c9cff1778.zip | |
[armadillo] Fix installation path (#7041)
| -rw-r--r-- | ports/armadillo/CONTROL | 2 | ||||
| -rw-r--r-- | ports/armadillo/fix-CMakePath.patch | 13 | ||||
| -rw-r--r-- | ports/armadillo/portfile.cmake | 10 | ||||
| -rw-r--r-- | ports/armadillo/usage | 4 |
4 files changed, 27 insertions, 2 deletions
diff --git a/ports/armadillo/CONTROL b/ports/armadillo/CONTROL index 78f0a66c3..ef0c926a5 100644 --- a/ports/armadillo/CONTROL +++ b/ports/armadillo/CONTROL @@ -1,4 +1,4 @@ Source: armadillo -Version: 2019-04-16-3 +Version: 2019-04-16-4 Description: Armadillo is a high quality linear algebra library (matrix maths) for the C++ language, aiming towards a good balance between speed and ease of use Build-Depends: openblas (!osx), clapack (!osx) diff --git a/ports/armadillo/fix-CMakePath.patch b/ports/armadillo/fix-CMakePath.patch new file mode 100644 index 000000000..58cca5c64 --- /dev/null +++ b/ports/armadillo/fix-CMakePath.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9fea721..e6a273d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -473,7 +473,7 @@ install(EXPORT ArmadilloLibraryDepends DESTINATION + # and install it + set(ARMADILLO_INCLUDE_DIRS "${CMAKE_INSTALL_FULL_INCLUDEDIR}") + set(ARMADILLO_LIB_DIR "${CMAKE_INSTALL_FULL_LIBDIR}") +-set(ARMADILLO_CMAKE_DIR "${CMAKE_INSTALL_FULL_DATADIR}/Armadillo/CMake") ++set(ARMADILLO_CMAKE_DIR "${CMAKE_INSTALL_FULL_DATADIR}/Armadillo") + + + message(STATUS "Generating '${PROJECT_BINARY_DIR}/InstallFiles/ArmadilloConfig.cmake'") diff --git a/ports/armadillo/portfile.cmake b/ports/armadillo/portfile.cmake index 143591de6..4e5798f9b 100644 --- a/ports/armadillo/portfile.cmake +++ b/ports/armadillo/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_from_gitlab( HEAD_REF 9.400.x PATCHES remove_custom_modules.patch + fix-CMakePath.patch ) file(REMOVE ${SOURCE_PATH}/cmake_aux/Modules/ARMA_FindBLAS.cmake) @@ -31,6 +32,13 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/Armadillo) +file(GLOB SHARE_CONTENT ${CURRENT_PACKAGES_DIR}/share/Armadillo) +list(LENGTH SHARE_CONTENT SHARE_LEN) +if(SHARE_LEN EQUAL 0) + # On case sensitive file system there is an extra empty directory created that should be removed + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/Armadillo) +endif() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/armadillo) file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/armadillo RENAME copyright) diff --git a/ports/armadillo/usage b/ports/armadillo/usage new file mode 100644 index 000000000..58066f6a9 --- /dev/null +++ b/ports/armadillo/usage @@ -0,0 +1,4 @@ +The package armadillo provides CMake targets:
+
+ find_package(Armadillo CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE ${ARMADILLO_LIBRARIES})
|
