mirror of
https://github.com/Z3Prover/z3
synced 2025-09-01 15:50:40 +00:00
[CMake] Implement support for building the .NET bindings.
When using Mono support for installing/uninstalling the bindings is also implemented. For Windows install/uninstall is not implemented because the python build system does not implement it and Microsoft's documentation (https://msdn.microsoft.com/en-us/library/dkkx7f79.aspx) says that the gacutil should only be used for development and not for production. For now a warning is just emitted if ``INSTALL_DOTNET_BINDINGS`` is enabled and the .NET toolchain is native Windows. Someone with better knowledge of how to correctly install assemblies under Windows should implement this or remove this message. A notable difference from the Python build system is the ``/linkresource:`` flag is not passed to the C# compiler. This means a user of the .NET bindings will have to copy the Z3 library (i.e. ``libz3.dll``) to their application directory manually. The reason for this difference is that using this flag requires the working directory to be the directory containing the Z3 library (i.e. ``libz3.dll``) but setting this up with multi-configuration generators doesn't currently seem possible.
This commit is contained in:
parent
6a2a8e06d7
commit
20d3bf4d0c
8 changed files with 390 additions and 0 deletions
|
@ -323,9 +323,16 @@ message(STATUS "Z3_DEPENDENT_EXTRA_C_LINK_FLAGS: ${Z3_DEPENDENT_EXTRA_C_LINK_FLA
|
|||
# Z3 installation locations
|
||||
################################################################################
|
||||
include(GNUInstallDirs)
|
||||
set(CMAKE_INSTALL_PKGCONFIGDIR
|
||||
"${CMAKE_INSTALL_LIBDIR}/pkgconfig"
|
||||
CACHE
|
||||
PATH
|
||||
"Directory to install pkgconfig files"
|
||||
)
|
||||
message(STATUS "CMAKE_INSTALL_LIBDIR: \"${CMAKE_INSTALL_LIBDIR}\"")
|
||||
message(STATUS "CMAKE_INSTALL_BINDIR: \"${CMAKE_INSTALL_BINDIR}\"")
|
||||
message(STATUS "CMAKE_INSTALL_INCLUDEDIR: \"${CMAKE_INSTALL_INCLUDEDIR}\"")
|
||||
message(STATUS "CMAKE_INSTALL_PKGCONFIGDIR: \"${CMAKE_INSTALL_PKGCONFIGDIR}\"")
|
||||
|
||||
################################################################################
|
||||
# Uninstall rule
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue