Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate and install pkg-config file for slint_cpp #7219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions api/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,24 @@ if(SLINT_BUILD_RUNTIME)

endif(SLINT_BUILD_RUNTIME)

if (SLINT_BUILD_RUNTIME)
function(_slint_write_pc_file)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/slint.pc.in
${CMAKE_CURRENT_BINARY_DIR}/slint.pc
@ONLY
)

install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/slint.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)
endfunction()

cmake_language(DEFER CALL _slint_write_pc_file)

endif(SLINT_BUILD_RUNTIME)

set(CPACK_PACKAGE_NAME "Slint-cpp")
set(CPACK_PACKAGE_VENDOR "Slint")
set(CPACK_VERBATIM_VARIABLES true)
Expand Down
16 changes: 16 additions & 0 deletions api/cpp/cmake/slint.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0

prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=@CMAKE_INSTALL_LIBDIR@
includedir=@CMAKE_INSTALL_INCLUDEDIR@/slint

Name: Slint
Description: Slint C++ Runtime
Version: @PROJECT_VERSION@

Cflags: -I${includedir}

Libs: -L${libdir} -lslint_cpp

1 change: 1 addition & 0 deletions xtask/src/license_headers_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ lazy_static! {
("\\.astro$", LicenseLocation::Tag(LicenseTagStyle::c_style_comment_style())),
("\\.cmake$", LicenseLocation::Tag(LicenseTagStyle::shell_comment_style())),
("\\.cmake.in$", LicenseLocation::Tag(LicenseTagStyle::shell_comment_style())),
("\\.pc.in$", LicenseLocation::Tag(LicenseTagStyle::shell_comment_style())),
("\\.conf$", LicenseLocation::Tag(LicenseTagStyle::shell_comment_style())),
("\\.cpp$", LicenseLocation::Tag(LicenseTagStyle::c_style_comment_style())),
("\\.css$", LicenseLocation::NoLicense),
Expand Down
Loading