Skip to content

cmake: fix define used to indicate a static or dynamic library in pkg-config - #370

Open
robUx4 wants to merge 1 commit into
JuliaStrings:masterfrom
robUx4:cmake-export
Open

robUx4 wants to merge 1 commit into
JuliaStrings:masterfrom
robUx4:cmake-export

Conversation

@robUx4

@robUx4 robUx4 commented Oct 9, 2026

Copy link
Copy Markdown

UTF8PROC_STATIC should be defined for static libraries in the pkg-config file for static libraries otherwise it's assumed to be a dynamic library build.

The same issue exists in the Makefile build.

robUx4 added a commit to robUx4/wrapdb that referenced this pull request Oct 9, 2026
…builds

When UTF8PROC_STATIC is not set, on Windows builds the dllimport/dllexport is used
for all public API's [^1]. This fails to link.

UTF8PROC_STATIC needs to be set for that.

And UTF8PROC_EXPORTS is a private define when building the DLL [^2][^3].
When using the DLL it should not be set.

I submitted a patch to fix this in the CMake builds [^4].

Fixes mesonbuild#2957

[^1]: https://github.com/JuliaStrings/utf8proc/blob/4bfe012cb879a58a70715526e9db6a49486df571/utf8proc.h#L123
[^2]: https://github.com/JuliaStrings/utf8proc/blob/4bfe012cb879a58a70715526e9db6a49486df571/utf8proc.h#L129
[^3]: https://github.com/JuliaStrings/utf8proc/blob/4bfe012cb879a58a70715526e9db6a49486df571/CMakeLists.txt#L40
[^4]: JuliaStrings/utf8proc#370
robUx4 added a commit to robUx4/wrapdb that referenced this pull request Oct 9, 2026
…builds

When UTF8PROC_STATIC is not set, on Windows builds the dllimport/dllexport is used
for all public API's [^1]. This fails to link.

UTF8PROC_STATIC needs to be set for that.

And UTF8PROC_EXPORTS is a private define when building the DLL [^2][^3].
When using the DLL it should not be set.

I submitted a patch to fix this in the CMake builds [^4].

Fixes mesonbuild#2957

[^1]: https://github.com/JuliaStrings/utf8proc/blob/4bfe012cb879a58a70715526e9db6a49486df571/utf8proc.h#L123
[^2]: https://github.com/JuliaStrings/utf8proc/blob/4bfe012cb879a58a70715526e9db6a49486df571/utf8proc.h#L129
[^3]: https://github.com/JuliaStrings/utf8proc/blob/4bfe012cb879a58a70715526e9db6a49486df571/CMakeLists.txt#L40
[^4]: JuliaStrings/utf8proc#370
robUx4 added a commit to robUx4/wrapdb that referenced this pull request Oct 9, 2026
…builds

When UTF8PROC_STATIC is not set, on Windows builds the dllimport/dllexport is used
for all public API's [^1]. This fails to link.

UTF8PROC_STATIC needs to be set for that.

And UTF8PROC_EXPORTS is a private define when building the DLL [^2][^3].
When using the DLL it should not be set.

I submitted a patch to fix this in the CMake builds [^4].

Fixes mesonbuild#2957

[^1]: https://github.com/JuliaStrings/utf8proc/blob/4bfe012cb879a58a70715526e9db6a49486df571/utf8proc.h#L123
[^2]: https://github.com/JuliaStrings/utf8proc/blob/4bfe012cb879a58a70715526e9db6a49486df571/utf8proc.h#L129
[^3]: https://github.com/JuliaStrings/utf8proc/blob/4bfe012cb879a58a70715526e9db6a49486df571/CMakeLists.txt#L40
[^4]: JuliaStrings/utf8proc#370

This branch has not been deployed

No deployments
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.

1 participant