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

Generate libdispatch.pc on non-apple platforms #801

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

Conversation

hmelder
Copy link

@hmelder hmelder commented Nov 19, 2023

libdispatch should install a pkg-config file as it is the defacto standard querying mechanism on Linux, and other platforms (excluding Apple).

Copy link
Collaborator

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how I feel about this. We should instead just provide a DispatchConfig.cmake instead I think.

CMakeLists.txt Outdated
@@ -285,6 +285,12 @@ else()
set(INSTALL_OS_HEADERS_DIR "include/os" CACHE PATH "Path where the headers will be installed")
endif()

if(NOT APPLE)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not happen on Windows or Android, please explicitly check for Linux and BSD.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. We use pkgconfig on windows aswell, but this a specific case. I will change it to UNIX AND NOT APPLE

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who is "we" in this case? We (the swift project) definitely doesn't use pkg-config on Windows, nor does "we" (The Browser Company).

@hmelder
Copy link
Author

hmelder commented Nov 19, 2023

I'm not sure how I feel about this. We should instead just provide a DispatchConfig.cmake instead I think.

I will look into that!

@hmelder
Copy link
Author

hmelder commented Nov 19, 2023

I'm not sure how I feel about this. We should instead just provide a DispatchConfig.cmake instead I think.

Do you mean a Configuration in cmake/config? Should I write a cmake function or just extract the existing generation of the pkg config file?

@hmelder
Copy link
Author

hmelder commented Nov 21, 2023

@compnerd

@compnerd
Copy link
Collaborator

I'm not sure how I feel about this. We should instead just provide a DispatchConfig.cmake instead I think.

Do you mean a Configuration in cmake/config? Should I write a cmake function or just extract the existing generation of the pkg config file?

No, CMake has its own means of providing the configuration for the project. Look at the CMake documentation related to FindPackage.

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

Successfully merging this pull request may close these issues.

2 participants