[ATK] Installing .pc files (#14972)

This commit is contained in:
HrOokami 2020-12-07 19:27:33 +03:00 committed by GitHub
parent f0935599bd
commit 08b3a4340c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 4 deletions

View File

@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 3.0)
project(atk C)
set(ATK_LIB_SUFFIX 1.0)
set(ATK_DLL_SUFFIX 1)
set(GLIB_LIB_VERSION 2.0)
set(ATK_LIB_SUFFIX @ATK_LIB_SUFFIX@)
set(ATK_DLL_SUFFIX @ATK_DLL_SUFFIX@)
set(GLIB_LIB_VERSION @GLIB_LIB_VERSION@)
if(BUILD_SHARED_LIBS)
set(ATK_EXPORT_MACRO DLL_EXPORT)
@ -142,3 +142,14 @@ message(STATUS " " ${LIBINTL_LIBRARY})
foreach(GL ${GLIB_LIBRARIES})
message(STATUS " " ${GL})
endforeach()
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
set(ATK_API_VERSION @ATK_API_VERSION@)
set(VERSION @ATK_VERSION@)
set(GLIB_PACKAGES "glib-${GLIB_LIB_VERSION} gobject-${GLIB_LIB_VERSION} gmodule-${GLIB_LIB_VERSION}")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/atk.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/atk.pc" @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/atk.pc" DESTINATION lib/pkgconfig)

View File

@ -1,5 +1,6 @@
Source: atk
Version: 2.24.0-5
Port-Version: 1
Homepage: https://developer.gnome.org/atk/
Description: GNOME Accessibility Toolkit
Build-Depends: glib, gettext

View File

@ -15,7 +15,17 @@ vcpkg_extract_source_archive_ex(
fix-linux-config.patch
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
# Here are used API version of library, not the version of library itself
set(ATK_LIB_SUFFIX 1.0)
set(ATK_DLL_SUFFIX 1)
set(GLIB_LIB_VERSION 2.0)
if (WIN32)
set(ATK_API_VERSION ${ATK_LIB_SUFFIX})
else()
set(ATK_API_VERSION ${ATK_DLL_SUFFIX})
endif()
configure_file("${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt.in" "${SOURCE_PATH}/CMakeLists.txt" @ONLY)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
@ -30,4 +40,6 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)