diff --git a/ports/matio/portfile.cmake b/ports/matio/portfile.cmake index 924b302cabb4b1..9d9bd70db7de5c 100644 --- a/ports/matio/portfile.cmake +++ b/ports/matio/portfile.cmake @@ -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) diff --git a/ports/matio/usage b/ports/matio/usage new file mode 100644 index 00000000000000..4a697912dfe247 --- /dev/null +++ b/ports/matio/usage @@ -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) diff --git a/ports/matio/vcpkg.json b/ports/matio/vcpkg.json index b5ff9bbc078740..5e6aa4d8ce3abb 100644 --- a/ports/matio/vcpkg.json +++ b/ports/matio/vcpkg.json @@ -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", diff --git a/versions/baseline.json b/versions/baseline.json index be39ab665b2bc4..5c4b9c1139fe9d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5354,7 +5354,7 @@ }, "matio": { "baseline": "1.5.23", - "port-version": 2 + "port-version": 3 }, "matplotlib-cpp": { "baseline": "2020-08-27", diff --git a/versions/m-/matio.json b/versions/m-/matio.json index bfd65ec39e899b..f0f3fc82ed8103 100644 --- a/versions/m-/matio.json +++ b/versions/m-/matio.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "42d087530e333855d74225712aab7755d2eb6be2", + "version": "1.5.23", + "port-version": 3 + }, { "git-tree": "28df0a44f618c5fd412fafda91507f3bad6ac4b1", "version": "1.5.23",