Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[many ports]switch to vcpkg-cmake / vckg-cmake-config part 4 #29884

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions ports/mnn/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
)

# 'cuda' feature in Windows failes with Ninja because of parallel PDB access. Make it optional
set(NINJA_OPTION PREFER_NINJA)
if("cuda" IN_LIST FEATURES)
set(NINJA_OPTION WINDOWS_USE_MSBUILD)
if(NOT "cuda" IN_LIST FEATURES)
unset(NINJA_OPTION)
endif()

set(FLATC_EXEC ${CURRENT_HOST_INSTALLED_DIR}/tools/flatbuffers/flatc${VCPKG_HOST_EXECUTABLE_SUFFIX})
set(FLATC_EXEC "${CURRENT_HOST_INSTALLED_DIR}/tools/flatbuffers/flatc${VCPKG_HOST_EXECUTABLE_SUFFIX}")
if (NOT EXISTS "${FLATC_EXEC}")
message(FATAL_ERROR "Expected ${FLATC_EXEC} to exist.")
endif()
Expand Down Expand Up @@ -66,8 +66,8 @@ endif()

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
${NINJA_OPTION}
OPTIONS
${FEATURE_OPTIONS} ${PLATFORM_OPTIONS}
Expand All @@ -77,7 +77,7 @@ vcpkg_configure_cmake(
OPTIONS_DEBUG
-DMNN_DEBUG_MEMORY=ON -DMNN_DEBUG_TENSOR_SIZE=ON
)
vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()

vcpkg_download_distfile(COPYRIGHT_PATH
Expand All @@ -86,19 +86,19 @@ vcpkg_download_distfile(COPYRIGHT_PATH
SHA512 98f6b79b778f7b0a15415bd750c3a8a097d650511cb4ec8115188e115c47053fe700f578895c097051c9bc3dfb6197c2b13a15de203273e1a3218884f86e90e8
)

file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(RENAME ${COPYRIGHT_PATH} ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(RENAME "${COPYRIGHT_PATH}" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")

if(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_IOS)
if("metal" IN_LIST FEATURES)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mnn.metallib
${CURRENT_PACKAGES_DIR}/share/${PORT}/mnn.metallib)
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/mnn.metallib"
"${CURRENT_PACKAGES_DIR}/share/${PORT}/mnn.metallib")
endif()
else()
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}")
endif()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
if("test" IN_LIST FEATURES)
# no install(TARGETS) for the following binaries. check the buildtrees...
# vcpkg_copy_tools(
Expand Down
8 changes: 6 additions & 2 deletions ports/mnn/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mnn",
"version": "1.1.0",
"port-version": 3,
"port-version": 4,
"description": "MNN is a blazing fast, lightweight deep learning framework, battle-tested by business-critical use cases in Alibaba",
"homepage": "https://www.mnn.zone/",
"license": "Apache-2.0",
Expand All @@ -13,7 +13,11 @@
"host": true
},
"rapidjson",
"stb"
"stb",
{
"name": "vcpkg-cmake",
"host": true
}
],
"features": {
"cuda": {
Expand Down
26 changes: 13 additions & 13 deletions ports/moos-essential/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@ vcpkg_from_github(
fix.patch
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)

vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()

file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/MOOS)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/MOOS")
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/pAntler")
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/pAntler ${CURRENT_PACKAGES_DIR}/tools/MOOS/pAntler)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/pLogger ${CURRENT_PACKAGES_DIR}/tools/MOOS/pLoggers)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/pMOOSBridge ${CURRENT_PACKAGES_DIR}/tools/MOOS/pMOOSBridge)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/pScheduler ${CURRENT_PACKAGES_DIR}/tools/MOOS/pScheduler)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/pShare ${CURRENT_PACKAGES_DIR}/tools/MOOS/pShare)
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/pAntler" "${CURRENT_PACKAGES_DIR}/tools/MOOS/pAntler")
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/pLogger" "${CURRENT_PACKAGES_DIR}/tools/MOOS/pLoggers")
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/pMOOSBridge" "${CURRENT_PACKAGES_DIR}/tools/MOOS/pMOOSBridge")
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/pScheduler" "${CURRENT_PACKAGES_DIR}/tools/MOOS/pScheduler")
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/pShare" "${CURRENT_PACKAGES_DIR}/tools/MOOS/pShare")
endif()


if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug")
endif()

file(WRITE ${CURRENT_PACKAGES_DIR}/include/fake_header.h "// fake header to pass vcpkg post install check \n")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "see moos-core for copyright\n" )
file(WRITE "${CURRENT_PACKAGES_DIR}/include/fake_header.h" "// fake header to pass vcpkg post install check \n")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "see moos-core for copyright\n" )
8 changes: 6 additions & 2 deletions ports/moos-essential/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"name": "moos-essential",
"version-string": "10.0.1",
"port-version": 3,
"port-version": 4,
"description": "a set of useful applications that leverage the core-moos communications layer.",
"homepage": "https://sites.google.com/site/moossoftware/",
"dependencies": [
"moos-core"
"moos-core",
{
"name": "vcpkg-cmake",
"host": true
}
]
}
25 changes: 12 additions & 13 deletions ports/moos-ui/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,26 @@ vcpkg_from_github(
HEAD_REF master
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_CONSOLE_TOOLS=ON
-DBUILD_GRAPHICAL_TOOLS=OFF #${BUILD_GRAPHICAL_TOOLS}
)

vcpkg_install_cmake()
vcpkg_cmake_install()

file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/MOOS)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/MOOS")
if (VCPKG_TARGET_IS_WINDOWS)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uPoke.exe ${CURRENT_PACKAGES_DIR}/tools/MOOS/uPoke.exe)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/iRemoteLite.exe ${CURRENT_PACKAGES_DIR}/tools/MOOS/iRemoteLite.exe)
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/uPoke.exe" "${CURRENT_PACKAGES_DIR}/tools/MOOS/uPoke.exe")
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/iRemoteLite.exe" "${CURRENT_PACKAGES_DIR}/tools/MOOS/iRemoteLite.exe")
else()
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uPoke ${CURRENT_PACKAGES_DIR}/tools/MOOS/uPoke)
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/iRemoteLite ${CURRENT_PACKAGES_DIR}/tools/MOOS/iRemoteLite)
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/uPoke" "${CURRENT_PACKAGES_DIR}/tools/MOOS/uPoke")
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/iRemoteLite" "${CURRENT_PACKAGES_DIR}/tools/MOOS/iRemoteLite")
endif()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/MOOS)
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/MOOS")

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug")

file(WRITE ${CURRENT_PACKAGES_DIR}/include/fake_header_ui.h "// fake header to pass vcpkg post install check \n")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "see moos-core for copyright\n" )
file(WRITE "${CURRENT_PACKAGES_DIR}/include/fake_header_ui.h" "// fake header to pass vcpkg post install check \n")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "see moos-core for copyright\n" )
8 changes: 6 additions & 2 deletions ports/moos-ui/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"name": "moos-ui",
"version-string": "10.0.1",
"port-version": 3,
"port-version": 4,
"description": "set of user interface tools to use and leverage the MOOS project.",
"homepage": "https://sites.google.com/site/moossoftware/",
"dependencies": [
"moos-core"
"moos-core",
{
"name": "vcpkg-cmake",
"host": true
}
]
}
18 changes: 9 additions & 9 deletions ports/morton-nd/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ vcpkg_from_github(
HEAD_REF main
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
PREFER_NINJA
OPTIONS
-DBUILD_TESTING=OFF
)

vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()

vcpkg_fixup_cmake_targets(CONFIG_PATH share/morton-nd/cmake TARGET_PATH)
vcpkg_cmake_config_fixup(CONFIG_PATH share/morton-nd/cmake)

file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug
${CURRENT_PACKAGES_DIR}/share/doc
"${CURRENT_PACKAGES_DIR}/debug"
"${CURRENT_PACKAGES_DIR}/share/doc"
)

# Handle copyright
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
file(COPY ${SOURCE_PATH}/NOTICE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
file(COPY "${SOURCE_PATH}/NOTICE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
14 changes: 12 additions & 2 deletions ports/morton-nd/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{
"name": "morton-nd",
"version-string": "4.0.0",
"port-version": 1,
"port-version": 2,
"description": "header-only constexpr library for fast Morton encoding/decoding in N dimensions.",
"homepage": "https://github.com/kevinhartman/morton-nd"
"homepage": "https://github.com/kevinhartman/morton-nd",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
16 changes: 8 additions & 8 deletions ports/mpark-variant/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ vcpkg_from_github(
HEAD_REF master
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)

vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()

vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/mpark_variant TARGET_PATH share/mpark_variant)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/mpark_variant PACKAGE_NAME mpark_variant)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib")

file(INSTALL
${SOURCE_PATH}/LICENSE.md
DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpark-variant RENAME copyright)
"${SOURCE_PATH}/LICENSE.md"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
14 changes: 12 additions & 2 deletions ports/mpark-variant/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
{
"name": "mpark-variant",
"version-string": "1.4.0",
"port-version": 1,
"description": "an implementation of C++17 std::variant for C++11/14/17."
"port-version": 2,
"description": "an implementation of C++17 std::variant for C++11/14/17.",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
14 changes: 6 additions & 8 deletions ports/msgpack/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,20 @@ else()
set(MSGPACK_ENABLE_STATIC OFF)
endif()

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DMSGPACK_ENABLE_SHARED=${MSGPACK_ENABLE_SHARED}
-DMSGPACK_ENABLE_STATIC=${MSGPACK_ENABLE_STATIC}
-DMSGPACK_BUILD_EXAMPLES=OFF
-DMSGPACK_BUILD_TESTS=OFF)

vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/msgpack)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/msgpack)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/msgpack)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/msgpack/COPYING ${CURRENT_PACKAGES_DIR}/share/msgpack/copyright)
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

vcpkg_fixup_pkgconfig()
14 changes: 12 additions & 2 deletions ports/msgpack/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
{
"name": "msgpack",
"version": "3.3.0",
"port-version": 3,
"port-version": 4,
"description": "MessagePack is an efficient binary serialization format, which lets you exchange data among multiple languages like JSON, except that it's faster and smaller.",
"homepage": "https://github.com/msgpack/msgpack-c",
"license": "BSL-1.0"
"license": "BSL-1.0",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
11 changes: 5 additions & 6 deletions ports/msgpack11/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,18 @@ vcpkg_from_github(
disable-werror.patch
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DMSGPACK11_BUILD_TESTS=OFF
-DMSGPACK11_BUILD_EXAMPLES=OFF
)


vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

vcpkg_fixup_pkgconfig()
vcpkg_fixup_pkgconfig()
8 changes: 6 additions & 2 deletions ports/msgpack11/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"name": "msgpack11",
"version": "0.0.10",
"port-version": 3,
"port-version": 4,
"description": "msgpack11 is a tiny MsgPack library for C++11, providing MsgPack parsing and serialization.This library is inspired by json11.The API of msgpack11 is designed to be similar with json11.",
"homepage": "https://msgpack.org",
"dependencies": [
"gtest"
"gtest",
{
"name": "vcpkg-cmake",
"host": true
}
]
}
Loading