Skip to content

autoconf: provide a harfbuzz-config for use from CMake - #822

Merged
ebraminio merged 1 commit into
harfbuzz:masterfrom
mathstuf:cmakeconfig
Feb 23, 2018
Merged

ebraminio merged 1 commit into
harfbuzz:masterfrom
mathstuf:cmakeconfig

Conversation

@mathstuf

Copy link
Copy Markdown
Contributor

Comment thread src/harfbuzz-config.cmake.in Outdated
list(GET _harfbuzz_version_info 2
_harfbuzz_age)
unset(_harfbuzz_version_info)
math(EXPR _harfbuzz_soname "${_harfbuzz_current} - ${_harfbuzz_age}")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't know that this is true. I don't see something obvious which has the soname string.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Digging into libtool code, this actually does seem to be true except for:

  • freebsd-aout
  • qnx
  • sco
  • sunos

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Our soname will stay 0 forever. If that ever was to change, the library will be called something else, like harfbuzz2.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sounds good to me.

@mathstuf mathstuf mentioned this pull request Feb 22, 2018
@mathstuf

mathstuf commented Feb 22, 2018 •

Copy link
Copy Markdown
Contributor Author

Tested with a simple CMake project:

cmake_minimum_required(VERSION 3.3)
project(foo C)

find_package(harfbuzz REQUIRED)

add_executable(foo foo.c)
target_link_libraries(foo
    harfbuzz::icu)
#include <hb.h>
int main(int argc, char* argv[]) { return 0; }

@ebraminio

Copy link
Copy Markdown
Collaborator

Thank you for this! :)

Comment thread src/harfbuzz-config.cmake.in Outdated
add_library(harfbuzz::harfbuzz SHARED IMPORTED)
set_target_properties(harfbuzz::harfbuzz PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_harfbuzz_prefix}/${_harfbuzz_includedir}/harfbuzz"
IMPORTED_LOCATION "${_harfbuzz_prefix}/${_harfbuzz_libdir}/libharfbuzz.so.0.${_harfbuzz_current}.${_harfbuzz_revision}")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this working on macOS with .dylibs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nope. I can try that out tomorrow.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you .so much :P

@mathstuf

Copy link
Copy Markdown
Contributor Author

Now tested on macOS as well.

@ebraminio

Copy link
Copy Markdown
Collaborator

@mathstuf, thank you very much!

@ebraminio
ebraminio merged commit d38f37b into harfbuzz:master Feb 23, 2018
@mathstuf
mathstuf deleted the cmakeconfig branch February 24, 2018 01:11
ebraminio referenced this pull request in wingtk/gvsbuild Mar 16, 2018
The CMake build doesn't install it.
tp-m added a commit to tp-m/harfbuzz that referenced this pull request Dec 3, 2018
tp-m added a commit to tp-m/harfbuzz that referenced this pull request Mar 9, 2020
ebraminio pushed a commit that referenced this pull request Mar 11, 2020
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.

3 participants