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

Support vcpkg #161

Open
ylz-at opened this issue Apr 14, 2022 · 2 comments
Open

Support vcpkg #161

ylz-at opened this issue Apr 14, 2022 · 2 comments

Comments

@ylz-at
Copy link
Contributor

ylz-at commented Apr 14, 2022

Hi, could you please support vcpkg?
Then the integration process will be as easy as vcpkg install optick.

@laycnc
Copy link

laycnc commented Jul 31, 2022

I agree with you.
We need this feature.

I have personally researched how to support vcpkg.
I was able to confirm that it works by placing the attached sample in vcpkg/ports/optick.
If @bombomby feels there is no problem, I would like to see this reflected in https://github.com/microsoft/vcpkg.

{
    "name": "optick",
    "version-string": "1.4.00",
    "port-version": 1,
    "description": "Optick is a super-lightweight C++ profiler for Games.",
    "homepage": "https://github.com/bombomby/optick",
    "license": "MIT",
    "dependencies": [
      {
        "name": "vcpkg-cmake",
        "host": true
      },
      {
        "name": "vcpkg-cmake-config",
        "host": true
      }
    ]
  }
 
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)

vcpkg_from_github(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO bombomby/optick
    REF 1.4.0.0
    SHA512 9b835163aef7adaa7296c90eb104a742a32021a420f05ae7dd4025bceea0c4f624a1f447684a2c8a88ee8c43fd54ec83809e9434e6a786922b3b07b90f10c64e
    HEAD_REF master
)

vcpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
    OPTIONS
        -DOPTICK_USE_VULKAN=OFF
)

vcpkg_cmake_install()

vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/optick)

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

vcpkg_copy_pdbs()

# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

@MasterDrake
Copy link

I agree with you. We need this feature.

I have personally researched how to support vcpkg. I was able to confirm that it works by placing the attached sample in vcpkg/ports/optick. If @bombomby feels there is no problem, I would like to see this reflected in https://github.com/microsoft/vcpkg.

{
    "name": "optick",
    "version-string": "1.4.00",
    "port-version": 1,
    "description": "Optick is a super-lightweight C++ profiler for Games.",
    "homepage": "https://github.com/bombomby/optick",
    "license": "MIT",
    "dependencies": [
      {
        "name": "vcpkg-cmake",
        "host": true
      },
      {
        "name": "vcpkg-cmake-config",
        "host": true
      }
    ]
  }
 
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)

vcpkg_from_github(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO bombomby/optick
    REF 1.4.0.0
    SHA512 9b835163aef7adaa7296c90eb104a742a32021a420f05ae7dd4025bceea0c4f624a1f447684a2c8a88ee8c43fd54ec83809e9434e6a786922b3b07b90f10c64e
    HEAD_REF master
)

vcpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
    OPTIONS
        -DOPTICK_USE_VULKAN=OFF
)

vcpkg_cmake_install()

vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/optick)

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

vcpkg_copy_pdbs()

# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

Worked perfectly!
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants