Skip to content

Commit

Permalink
[matio] Add usage (microsoft#34505)
Browse files Browse the repository at this point in the history
* add usage

* update version

* fix usage

* update version

* fix review

* udpate version

* fix variables

* update version
  • Loading branch information
jimwang118 authored Oct 23, 2023
1 parent bcc8b84 commit f31f2c7
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 2 deletions.
12 changes: 12 additions & 0 deletions ports/matio/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,22 @@ vcpkg_cmake_configure(

vcpkg_cmake_install()

set(prefix "${CURRENT_INSTALLED_DIR}")
set(exec_prefix [[${prefix}]])
set(libdir [[${prefix}/lib]])
set(includedir [[${prefix}/include]])
configure_file("${SOURCE_PATH}/matio.pc.in" "${SOURCE_PATH}/matio.pc" @ONLY)
file(INSTALL "${SOURCE_PATH}/matio.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
if(NOT VCPKG_BUILD_TYPE)
set(includedir [[${prefix}/../include]])
file(INSTALL "${SOURCE_PATH}/matio.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
endif()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()

vcpkg_copy_tools(TOOL_NAMES matdump AUTO_CLEAN)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
5 changes: 5 additions & 0 deletions ports/matio/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
matio can be imported via CMake FindPkgConfig module:

find_package(PkgConfig REQUIRED)
pkg_check_modules(matio REQUIRED IMPORTED_TARGET matio)
target_link_libraries(main PRIVATE PkgConfig::matio)
2 changes: 1 addition & 1 deletion ports/matio/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "matio",
"version": "1.5.23",
"port-version": 2,
"port-version": 3,
"description": "MATLAB MAT File I/O Library",
"homepage": "https://github.com/tbeu/matio",
"license": "BSD-2-Clause",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5354,7 +5354,7 @@
},
"matio": {
"baseline": "1.5.23",
"port-version": 2
"port-version": 3
},
"matplotlib-cpp": {
"baseline": "2020-08-27",
Expand Down
5 changes: 5 additions & 0 deletions versions/m-/matio.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "42d087530e333855d74225712aab7755d2eb6be2",
"version": "1.5.23",
"port-version": 3
},
{
"git-tree": "28df0a44f618c5fd412fafda91507f3bad6ac4b1",
"version": "1.5.23",
Expand Down

0 comments on commit f31f2c7

Please sign in to comment.