Before this change, the generated Makefile by CMake lacked the capability to run make install. This PR makes it possible
to run make install, for example:
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE -DCASS_INSTALL_PKG_CONFIG=OFF -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib64 ..
make DESTDIR=/tmp/example install
The names and contents of installed files try to mimic the original C++ Driver files. For example, installation of C++ Driver generates the following .so files/symlinks:
This particular behavior is replicated in a new build-cmake-compat.sh script, which is executed as a BUILD_COMMAND in the Rust external project in the top-level CMakeLists.txt.
Unfortunately, I have not been able to configure CMake to create such symlinks on its own. One of the reasons is an unfixed bug in CMake: https://gitlab.kitware.com/cmake/cmake/-/issues/23249#note_1277271. Therefore, the build-cmake-compat.sh is introduced to create the necessary files in a way it's easy to install for CMake.
The third commit includes the static library in the installed files.
Those are the contents of DESTDIR (as in make DESTDIR=... install) in the original C++ driver:
Before this change, the generated Makefile by CMake lacked the capability to run
make install
. This PR makes it possible to runmake install
, for example:The names and contents of installed files try to mimic the original C++ Driver files. For example, installation of C++ Driver generates the following
.so
files/symlinks:This particular behavior is replicated in a new
build-cmake-compat.sh
script, which is executed as aBUILD_COMMAND
in the Rust external project in the top-levelCMakeLists.txt
.Unfortunately, I have not been able to configure CMake to create such symlinks on its own. One of the reasons is an unfixed bug in CMake: https://gitlab.kitware.com/cmake/cmake/-/issues/23249#note_1277271. Therefore, the
build-cmake-compat.sh
is introduced to create the necessary files in a way it's easy to install for CMake.The third commit includes the static library in the installed files.
Those are the contents of
DESTDIR
(as inmake DESTDIR=... install
) in the original C++ driver:and after this PR in the bindings:
This PR is a prerequisite for a follow-up PR reworking #88.
Pre-review checklist
.github/workflows/build.yml
ingtest_filter
..github/workflows/cassandra.yml
ingtest_filter
.