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

Fix pkgconfig files on windows #1839

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nirbheek
Copy link

@nirbheek nirbheek commented Jan 9, 2022

build: Fix libdir in pkgconfig files for Windows

Windows import libraries are installed inside ARCHIVE_DIRECTORY, not
LIBRARY_DIRECTORY. So we need to use that for libdir on Windows.
build: Set -DUSE_IMPORT_EXPORT in pkgconfig files on Windows

MSVC consumers of the shared library need to define this macro when
linking to aws-cpp-sdk-* libs, or they will get undefined reference
errors. Also doesn't hurt to define this with MinGW, so add it
unconditionally on Windows.

This PR plus amzn/amazon-s3-gst-plugin#23 fixes amzn/amazon-s3-gst-plugin#13

Check all that applies:

  • Did a review by yourself.
  • Added proper tests to cover this PR. (If tests are not applicable, explain.)
    • Build system fix, doesn't require a test
  • Checked if this PR is a breaking (APIs have been changed) change.
  • Checked if this PR will not introduce cross-platform inconsistent behavior.
  • Checked if this PR would require a ReadMe/Wiki update.

Check which platforms you have built SDK on to verify the correctness of this PR.

  • Linux
  • Windows
  • Android
  • MacOS
  • IOS
  • Other Platforms

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Windows import libraries are installed inside ARCHIVE_DIRECTORY, not
LIBRARY_DIRECTORY. So we need to use that for libdir on Windows.

Related to amzn/amazon-s3-gst-plugin#13
MSVC consumers of the shared library need to define this macro when
linking to aws-cpp-sdk-* libs, or they will get undefined reference
errors. Also doesn't hurt to define this with MinGW, so add it
unconditionally on Windows.

Related to amzn/amazon-s3-gst-plugin#13
@nacho
Copy link

nacho commented Jan 21, 2022

LGTM

@nirbheek
Copy link
Author

Could someone please review this? It is necessary for an Amazon product to work correctly :)

@nirbheek
Copy link
Author

nirbheek commented Aug 1, 2022

Poke?

@jmklix
Copy link
Member

jmklix commented Jan 27, 2023

#1888

@jmklix jmklix added the needs-review This issue or pull request needs review from a core team member. label Jan 27, 2023
saraboule added a commit to blinemedical/aws-sdk-cpp that referenced this pull request Jul 3, 2023
@jawilson
Copy link

Poke?

@jmklix jmklix added the Cmake Cmake related submissions label Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cmake Cmake related submissions needs-review This issue or pull request needs review from a core team member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot build on Windows
4 participants