3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 01:24:08 +00:00

Add pkg-config file (#4368)

* Add pkg-config file

* Copy z3.cmake.in to the Docker for CI
This commit is contained in:
Anton Kochkov 2020-05-22 00:10:41 +08:00 committed by GitHub
parent 1729232254
commit 7e84a48069
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 1 deletions

View file

@ -568,6 +568,9 @@ write_basic_package_version_file("${PROJECT_BINARY_DIR}/Z3ConfigVersion.cmake"
COMPATIBILITY SameMajorVersion
)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/z3.pc.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/z3.pc" @ONLY)
################################################################################
# Create `Z3Config.cmake` and related files for install tree so clients can use
# Z3 via CMake.
@ -610,6 +613,12 @@ install(
DESTINATION "${CMAKE_INSTALL_Z3_CMAKE_PACKAGE_DIR}"
)
# Add install rule to install ${PROJECT_BINARY_DIR}/z3.pc
install(
FILES "${PROJECT_BINARY_DIR}/z3.pc"
DESTINATION "${CMAKE_INSTALL_PKGCONFIGDIR}"
)
################################################################################
# Examples
################################################################################

View file

@ -75,7 +75,7 @@ ADD /doc ${Z3_SRC_DIR}/doc/
ADD /examples ${Z3_SRC_DIR}/examples/
ADD /scripts ${Z3_SRC_DIR}/scripts/
ADD /src ${Z3_SRC_DIR}/src/
ADD *.txt *.md RELEASE_NOTES ${Z3_SRC_DIR}/
ADD *.txt *.md *.cmake.in RELEASE_NOTES ${Z3_SRC_DIR}/
ADD \
/contrib/ci/scripts/build_z3_cmake.sh \

13
z3.pc.cmake.in Normal file
View file

@ -0,0 +1,13 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_LIBDIR@
sharedlibdir=@CMAKE_INSTALL_LIBDIR@
includedir=@CMAKE_INSTALL_INCLUDEDIR@
Name: z3
Description: The Z3 Theorem Prover
Version: @VERSION@
Requires:
Libs: -L${libdir} -L${sharedlibdir} -lz3
Cflags: -I${includedir}