annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/lib/cmake/harfbuzz/harfbuzz-config.cmake @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 # Set these variables so that the `${prefix}/lib` expands to something we can
jpayne@69 2 # remove.
jpayne@69 3 set(_harfbuzz_remove_string "REMOVE_ME")
jpayne@69 4 set(exec_prefix "${_harfbuzz_remove_string}")
jpayne@69 5 set(prefix "${_harfbuzz_remove_string}")
jpayne@69 6
jpayne@69 7 # Compute the installation prefix by stripping components from our current
jpayne@69 8 # location.
jpayne@69 9 get_filename_component(_harfbuzz_prefix "${CMAKE_CURRENT_LIST_DIR}" DIRECTORY)
jpayne@69 10 get_filename_component(_harfbuzz_prefix "${_harfbuzz_prefix}" DIRECTORY)
jpayne@69 11 set(_harfbuzz_libdir "${prefix}/lib")
jpayne@69 12 string(REPLACE "${_harfbuzz_remove_string}/" "" _harfbuzz_libdir "${_harfbuzz_libdir}")
jpayne@69 13 set(_harfbuzz_libdir_iter "${_harfbuzz_libdir}")
jpayne@69 14 while (_harfbuzz_libdir_iter)
jpayne@69 15 set(_harfbuzz_libdir_prev_iter "${_harfbuzz_libdir_iter}")
jpayne@69 16 get_filename_component(_harfbuzz_libdir_iter "${_harfbuzz_libdir_iter}" DIRECTORY)
jpayne@69 17 if (_harfbuzz_libdir_prev_iter STREQUAL _harfbuzz_libdir_iter)
jpayne@69 18 break()
jpayne@69 19 endif ()
jpayne@69 20 get_filename_component(_harfbuzz_prefix "${_harfbuzz_prefix}" DIRECTORY)
jpayne@69 21 endwhile ()
jpayne@69 22 unset(_harfbuzz_libdir_iter)
jpayne@69 23
jpayne@69 24 # Get the include subdir.
jpayne@69 25 set(_harfbuzz_includedir "${prefix}/include")
jpayne@69 26 string(REPLACE "${_harfbuzz_remove_string}/" "" _harfbuzz_includedir "${_harfbuzz_includedir}")
jpayne@69 27
jpayne@69 28 # Extract version information from libtool.
jpayne@69 29 set(_harfbuzz_version_info "20702:0:20702")
jpayne@69 30 string(REPLACE ":" ";" _harfbuzz_version_info "${_harfbuzz_version_info}")
jpayne@69 31 list(GET _harfbuzz_version_info 0
jpayne@69 32 _harfbuzz_current)
jpayne@69 33 list(GET _harfbuzz_version_info 1
jpayne@69 34 _harfbuzz_revision)
jpayne@69 35 list(GET _harfbuzz_version_info 2
jpayne@69 36 _harfbuzz_age)
jpayne@69 37 unset(_harfbuzz_version_info)
jpayne@69 38
jpayne@69 39 if (APPLE)
jpayne@69 40 set(_harfbuzz_lib_suffix ".0${CMAKE_SHARED_LIBRARY_SUFFIX}")
jpayne@69 41 elseif (UNIX)
jpayne@69 42 set(_harfbuzz_lib_suffix "${CMAKE_SHARED_LIBRARY_SUFFIX}.0.${_harfbuzz_current}.${_harfbuzz_revision}")
jpayne@69 43 else ()
jpayne@69 44 # Unsupported.
jpayne@69 45 set(harfbuzz_FOUND 0)
jpayne@69 46 endif ()
jpayne@69 47
jpayne@69 48 # Add the libraries.
jpayne@69 49 add_library(harfbuzz::harfbuzz SHARED IMPORTED)
jpayne@69 50 set_target_properties(harfbuzz::harfbuzz PROPERTIES
jpayne@69 51 INTERFACE_INCLUDE_DIRECTORIES "${_harfbuzz_prefix}/${_harfbuzz_includedir}/harfbuzz"
jpayne@69 52 IMPORTED_LOCATION "${_harfbuzz_prefix}/${_harfbuzz_libdir}/libharfbuzz${_harfbuzz_lib_suffix}")
jpayne@69 53
jpayne@69 54 add_library(harfbuzz::icu SHARED IMPORTED)
jpayne@69 55 set_target_properties(harfbuzz::icu PROPERTIES
jpayne@69 56 INTERFACE_INCLUDE_DIRECTORIES "${_harfbuzz_prefix}/${_harfbuzz_includedir}/harfbuzz"
jpayne@69 57 INTERFACE_LINK_LIBRARIES "harfbuzz::harfbuzz"
jpayne@69 58 IMPORTED_LOCATION "${_harfbuzz_prefix}/${_harfbuzz_libdir}/libharfbuzz-icu${_harfbuzz_lib_suffix}")
jpayne@69 59
jpayne@69 60 add_library(harfbuzz::subset SHARED IMPORTED)
jpayne@69 61 set_target_properties(harfbuzz::subset PROPERTIES
jpayne@69 62 INTERFACE_INCLUDE_DIRECTORIES "${_harfbuzz_prefix}/${_harfbuzz_includedir}/harfbuzz"
jpayne@69 63 INTERFACE_LINK_LIBRARIES "harfbuzz::harfbuzz"
jpayne@69 64 IMPORTED_LOCATION "${_harfbuzz_prefix}/${_harfbuzz_libdir}/libharfbuzz-subset${_harfbuzz_lib_suffix}")
jpayne@69 65
jpayne@69 66 # Only add the gobject library if it was built.
jpayne@69 67 set(_harfbuzz_have_gobject "true")
jpayne@69 68 if (_harfbuzz_have_gobject)
jpayne@69 69 add_library(harfbuzz::gobject SHARED IMPORTED)
jpayne@69 70 set_target_properties(harfbuzz::gobject PROPERTIES
jpayne@69 71 INTERFACE_INCLUDE_DIRECTORIES "${_harfbuzz_prefix}/${_harfbuzz_includedir}/harfbuzz"
jpayne@69 72 INTERFACE_LINK_LIBRARIES "harfbuzz::harfbuzz"
jpayne@69 73 IMPORTED_LOCATION "${_harfbuzz_prefix}/${_harfbuzz_libdir}/libharfbuzz-gobject${_harfbuzz_lib_suffix}")
jpayne@69 74 endif ()
jpayne@69 75
jpayne@69 76 # Clean out variables we used in our scope.
jpayne@69 77 unset(_harfbuzz_lib_suffix)
jpayne@69 78 unset(_harfbuzz_current)
jpayne@69 79 unset(_harfbuzz_revision)
jpayne@69 80 unset(_harfbuzz_age)
jpayne@69 81 unset(_harfbuzz_includedir)
jpayne@69 82 unset(_harfbuzz_libdir)
jpayne@69 83 unset(_harfbuzz_prefix)
jpayne@69 84 unset(exec_prefix)
jpayne@69 85 unset(prefix)
jpayne@69 86 unset(_harfbuzz_remove_string)