annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/lib/cmake/harfbuzz/harfbuzz-config.cmake @ 68:5028fdace37b

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