Skip to content

Commit

Permalink
address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
eharshosh committed Jan 17, 2023
1 parent 089aa80 commit e859eeb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
13 changes: 6 additions & 7 deletions ports/nanopb/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,23 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS

vcpkg_find_acquire_program(PYTHON3)

vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DPython_EXECUTABLE=${PYTHON3}
-Dnanopb_BUILD_RUNTIME=ON
-DBUILD_STATIC_LIBS=${nanopb_BUILD_STATIC_LIBS}
-Dnanopb_MSVC_STATIC_RUNTIME=${nanopb_STATIC_LINKING}
-Dnanopb_PROTOC_PATH=${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX}
-Dnanopb_PROTOC_PATH="${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX}"
${FEATURE_OPTIONS}
)
vcpkg_install_cmake()
vcpkg_cmake_install()

vcpkg_copy_pdbs()

vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")

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

if(nanopb_BUILD_GENERATOR)
file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/nanopb_generator.py" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
Expand All @@ -54,4 +53,4 @@ if(nanopb_BUILD_STATIC_LIBS)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
# Handle copyright
configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
13 changes: 12 additions & 1 deletion ports/nanopb/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version-semver": "0.4.7",
"description": "A small code-size Protocol Buffers implementation in ANSI C.",
"homepage": "https://jpa.kapsi.fi/nanopb/",
"license": "Zlib",
"features": {
"generator": {
"description": "build the generator",
Expand All @@ -13,5 +14,15 @@
}
]
}
}
},
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

0 comments on commit e859eeb

Please sign in to comment.