vcpkg/ports/z3/fix-install-path.patch
2019-05-21 04:31:57 +00:00

117 lines
5.3 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9877af8..10ef458 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -675,7 +675,7 @@ install(EXPORT
Z3_EXPORTED_TARGETS
FILE "Z3Targets.cmake"
NAMESPACE z3::
- DESTINATION "${CMAKE_INSTALL_Z3_CMAKE_PACKAGE_DIR}"
+ DESTINATION share/z3
)
set(Z3_INSTALL_TREE_CMAKE_CONFIG_FILE "${CMAKE_BINARY_DIR}/cmake/Z3Config.cmake")
set(Z3_FIRST_PACKAGE_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}")
@@ -700,7 +700,7 @@ unset(CONFIG_FILE_TYPE)
# Add install rule to install ${Z3_INSTALL_TREE_CMAKE_CONFIG_FILE}
install(
FILES "${Z3_INSTALL_TREE_CMAKE_CONFIG_FILE}"
- DESTINATION "${CMAKE_INSTALL_Z3_CMAKE_PACKAGE_DIR}"
+ DESTINATION share/z3
)
# TODO: Provide a `Z3Version.cmake` file so that clients can specify the version
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index b097126..e127bef 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -88,6 +88,6 @@ set(CMAKE_INSTALL_API_BINDINGS_DOC
if (INSTALL_API_BINDINGS_DOCUMENTATION)
install(
DIRECTORY "${DOC_DEST_DIR}"
- DESTINATION "${CMAKE_INSTALL_API_BINDINGS_DOC}"
+ DESTINATION share/z3
)
endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c497c19..0b0e081 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -173,7 +173,8 @@ install(TARGETS libz3
EXPORT Z3_EXPORTED_TARGETS
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" # On Windows this installs ``libz3.lib`` which CMake calls the "corresponding import library". Do we want this installed?
- RUNTIME DESTINATION "${CMAKE_INSTALL_LIBDIR}" # For Windows. DLLs are runtime targets for CMake
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" # For Windows. DLLs are runtime targets for CMake
+ BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}" # For MACOSX.
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
diff --git a/src/api/dotnet/CMakeLists.txt b/src/api/dotnet/CMakeLists.txt
index 20621e4..57bb3f0 100644
--- a/src/api/dotnet/CMakeLists.txt
+++ b/src/api/dotnet/CMakeLists.txt
@@ -257,7 +257,7 @@ if (DOTNET_TOOLCHAIN_IS_MONO)
message(STATUS "Emitting install rules for .NET bindings")
# Install pkgconfig file for the assembly. This is needed by Monodevelop
# to find the assembly
- install(FILES "${Z3_DOTNET_PKGCONFIG_FILE}" DESTINATION "${CMAKE_INSTALL_PKGCONFIGDIR}")
+ install(FILES "${Z3_DOTNET_PKGCONFIG_FILE}" DESTINATION share/z3/pkgconfig)
# Configure the install and uninstall scripts.
# Note: If multi-configuration generator support is ever fixed then these
@@ -266,7 +266,7 @@ if (DOTNET_TOOLCHAIN_IS_MONO)
configure_file(cmake_uninstall_gac.cmake.in cmake_uninstall_gac.cmake @ONLY)
# Tell CMake to Invoke a script to install assembly to the GAC during install
- install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/cmake_install_gac.cmake")
+ install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/cmake_install_gac.cmake" DESTINATION share/z3)
# Add custom target to uninstall the assembly from the GAC
add_custom_target(remove_dotnet_dll_from_gac
@@ -280,7 +280,7 @@ elseif(DOTNET_TOOLCHAIN_IS_WINDOWS)
# Don't install Z3_DOTNET_ASSEMBLY_DLL into the gac. Instead just copy into
# installation directory.
install(FILES "${Z3_DOTNET_ASSEMBLY_DLL}" DESTINATION "${CMAKE_INSTALL_LIBDIR}")
- install(FILES "${Z3_DOTNET_ASSEMBLY_DLL_DOC}" DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+ install(FILES "${Z3_DOTNET_ASSEMBLY_DLL_DOC}" DESTINATION share/z3)
else()
message(FATAL_ERROR "Unknown .NET toolchain")
endif()
diff --git a/src/api/java/CMakeLists.txt b/src/api/java/CMakeLists.txt
index c2d73ff..506142c 100644
--- a/src/api/java/CMakeLists.txt
+++ b/src/api/java/CMakeLists.txt
@@ -228,7 +228,7 @@ if (INSTALL_JAVA_BINDINGS)
PATH
"Directory to install Z3 Java JNI bridge library relative to install prefix"
)
- install(TARGETS z3java DESTINATION "${Z3_JAVA_JNI_LIB_INSTALLDIR}")
+ install(TARGETS z3java DESTINATION share/z3)
# Note: Don't use ``DESTINATION`` here as the version of ``UseJava.cmake`` shipped
# with CMake 2.8.12.2 handles that incorrectly.
install_jar(z3JavaJar "${Z3_JAVA_JAR_INSTALLDIR}")
diff --git a/src/api/python/CMakeLists.txt b/src/api/python/CMakeLists.txt
index 6efdc15..e4d5be0 100644
--- a/src/api/python/CMakeLists.txt
+++ b/src/api/python/CMakeLists.txt
@@ -136,7 +136,7 @@ if (INSTALL_PYTHON_BINDINGS)
# Using DESTDIR still seems to work even if we use an absolute path
message(STATUS "Python bindings will be installed to \"${CMAKE_INSTALL_PYTHON_PKG_DIR}\"")
install(FILES ${build_z3_python_bindings_target_depends}
- DESTINATION "${CMAKE_INSTALL_PYTHON_PKG_DIR}/z3"
+ DESTINATION share/z3
)
else()
message(STATUS "Not emitting rules to install Z3 python bindings")
diff --git a/src/shell/CMakeLists.txt b/src/shell/CMakeLists.txt
index 2782463..b6cd2f1 100644
--- a/src/shell/CMakeLists.txt
+++ b/src/shell/CMakeLists.txt
@@ -44,5 +44,5 @@ target_link_libraries(shell PRIVATE ${Z3_DEPENDENT_LIBS})
z3_add_component_dependencies_to_target(shell ${shell_expanded_deps})
z3_append_linker_flag_list_to_target(shell ${Z3_DEPENDENT_EXTRA_CXX_LINK_FLAGS})
install(TARGETS shell
- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ RUNTIME DESTINATION tools/z3
)