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

CMake Error when using with vcpkg #172

Open
ParticleG opened this issue Aug 4, 2024 · 4 comments
Open

CMake Error when using with vcpkg #172

ParticleG opened this issue Aug 4, 2024 · 4 comments

Comments

@ParticleG
Copy link

Reproduce repo: Studio26F
vcpkg.json:

{
  "name": "studio26f",
  "version-string": "1.0.0",
  "maintainers": [
    "Particle_G <[email protected]>"
  ],
  "description": "The new centralized backend for the block stacking game <Techmino>",
  "homepage": "https://github.com/26F-Studio/Studio26F",
  "documentation": "https://github.com/26F-Studio/Studio26F",
  "license": "LGPL-3.0",
  "dependencies": [
    "cryptopp",
    {
      "name": "drogon",
      "default-features": false,
      "features": [
        "ctl",
        "orm",
        "postgres",
        "redis"
      ]
    },
    "mailio",
    "magic-enum",
    "range-v3"
  ]
}
CMake Error at cmake-build-debug/vcpkg_installed/x64-windows/share/mailio/mailioConfig.cmake:61 (set_target_properties):
  The link interface of target "mailio" contains:

    Boost::system

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
  CMakeLists.txt:35 (find_package)


CMake Generate step failed.  Build files cannot be regenerated correctly.
ninja: error: rebuilding 'build.ninja': subcommand failed
@karastojko
Copy link
Owner

Does it work when directly consumed from Vcpkg? Because the Microsoft CI/CD worked fine for the version 0.23.

@ParticleG
Copy link
Author

I'm currently using vcpkg as a submodule, and I havn't tried with an empty vcpkg.json which has mailio as the only one dependency. Would try that out.

@hotaery
Copy link

hotaery commented Aug 26, 2024

Hi, @ParticleG Have you solve this problem?

@hotaery
Copy link

hotaery commented Aug 27, 2024

modify CMakeLists.txt from

find_package(mailio CONFIG REQUIRED)

to

find_package(boost_system CONFIG REQUIRED)
find_package(boost_date_time CONFIG REQUIRED)

find_package(mailio CONFIG REQUIRED)

fix my problem

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