Skip to content

[CDRIVER-5961] [CDRIVER-2086] Renaming of binaries, packages, and install paths #1965

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
dc6abf0
Add CTest cases to test pkg-config importing
vector-of-bool Mar 28, 2025
3e2c73a
Set CMAKE_PREFIX_PATH in TestProject
vector-of-bool Mar 28, 2025
c473354
Change the link line for pkg-config static libs
vector-of-bool Mar 28, 2025
6c1a8d9
Rename libbson pkg-config files
vector-of-bool Mar 28, 2025
656500e
[fixup] pkg-config generation for static libs
vector-of-bool Mar 28, 2025
81fcf66
Update libbson file names and install paths
vector-of-bool Mar 28, 2025
ae672d9
Remove fragile installed-files tests, revise some for new filenames
vector-of-bool Mar 28, 2025
962edc2
Suppress DESTDIR when installing a project for testing
vector-of-bool Mar 29, 2025
af0eba7
Give DLL implibs a different file extension
vector-of-bool Mar 29, 2025
48ae320
Only set the implib suffix on Windows
vector-of-bool Mar 29, 2025
4b34745
Tweak import tests to not assume the major version
vector-of-bool Mar 30, 2025
6cbc3f2
Remove install code for Apple frameworks and modulemaps
vector-of-bool Mar 30, 2025
bba33a7
Minor cleanup around docs targets
vector-of-bool Mar 30, 2025
14ddf56
Minor wording tweaks
vector-of-bool Mar 30, 2025
ec82d99
libmongoc component renaming
vector-of-bool Mar 30, 2025
b5af35c
Remove more X_API_VERSION
vector-of-bool Mar 30, 2025
f8d4845
Remove libmongoc-ssl .pc files
vector-of-bool Mar 30, 2025
c7bdbda
Spelling
vector-of-bool Mar 31, 2025
8f42b2f
Fix transposed version variables
vector-of-bool Mar 31, 2025
5d5be9e
Wrong pkg-config filenames
vector-of-bool Mar 31, 2025
018dca4
Add NEWS entries regarding package renames
vector-of-bool Mar 31, 2025
51d7f83
Qualify installation of docs and licenses
vector-of-bool Mar 31, 2025
497721c
Major-version qualify the `mongoc-stat` tool
vector-of-bool Mar 31, 2025
dd654c2
use version 2 to refer to new libbson pkg-config files
kevinAlbs Apr 1, 2025
b005203
relocate NEWS for libmongoc pkg-config file rename to "Changes"
kevinAlbs Apr 1, 2025
4d202bb
fix references to mongoc-stat
kevinAlbs Apr 1, 2025
bde75c2
Merge branch 'master' into CDRIVER-5931-cmake-packaging-2.x-pt2
kevinAlbs Apr 1, 2025
e7f79e6
Merge branch 'master' into CDRIVER-5931-cmake-packaging-2.x-pt2
kevinAlbs Apr 1, 2025
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
76 changes: 0 additions & 76 deletions .evergreen/scripts/check-installed-files-bson.bat

This file was deleted.

66 changes: 0 additions & 66 deletions .evergreen/scripts/check-installed-files.bat

This file was deleted.

47 changes: 13 additions & 34 deletions .evergreen/scripts/install-uninstall-check-windows.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ set CMAKE_MAKE_PROGRAM=C:\mingw-w64\x86_64-4.9.1-posix-seh-rt_v3-rev1\mingw64\bi
rem Ensure Cygwin executables like sh.exe are not in PATH
set PATH=C:\cygwin\bin;C:\Windows\system32;C:\Windows;C:\mingw-w64\x86_64-4.9.1-posix-seh-rt_v3-rev1\mingw64\bin;C:\mongoc;src\libbson;src\libmongoc

set version=1.31.0
set major=1

if "%BSON_ONLY%"=="1" (
set BUILD_DIR=%CD%\build-dir-bson
set INSTALL_DIR=%CD%\install-dir-bson
Expand Down Expand Up @@ -120,29 +123,11 @@ echo.%CC%| findstr /I "gcc">Nul && (
)
)

if exist %INSTALL_DIR%\lib\pkgconfig\libbson-1.0.pc (
echo libbson-1.0.pc found!
exit /B 1
) else (
echo libbson-1.0.pc check ok
)
if exist %INSTALL_DIR%\lib\cmake\bson-1.0\bson-1.0-config.cmake (
echo bson-1.0-config.cmake found!
exit /B 1
) else (
echo bson-1.0-config.cmake check ok
)
if exist %INSTALL_DIR%\lib\cmake\bson-1.0\bson-1.0-config-version.cmake (
echo bson-1.0-config-version.cmake found!
if exist %INSTALL_DIR%\lib\pkgconfig\bson%major%.pc (
echo bson%major%.pc found!
exit /B 1
) else (
echo bson-1.0-config-version.cmake check ok
)
if exist %INSTALL_DIR%\lib\cmake\bson-1.0\bson-targets.cmake (
echo bson-targets.cmake found!
exit /B 1
) else (
echo bson-targets.cmake check ok
echo bson%major%.pc check ok
)
if not exist %INSTALL_DIR%\lib\canary.txt (
echo canary.txt not found!
Expand All @@ -157,11 +142,11 @@ if not exist %INSTALL_DIR%\lib (
echo %INSTALL_DIR%\lib check ok
)
if "%BSON_ONLY%" NEQ "1" (
if exist %INSTALL_DIR%\lib\pkgconfig\libmongoc-1.0.pc (
echo libmongoc-1.0.pc found!
if exist %INSTALL_DIR%\lib\pkgconfig\mongoc%major%.pc (
echo mongoc%major%.pc found!
exit /B 1
) else (
echo libmongoc-1.0.pc check ok
echo mongoc%major%.pc check ok
)
if exist %INSTALL_DIR%\lib\cmake\mongoc-1.0\mongoc-1.0-config.cmake (
echo mongoc-1.0-config.cmake found!
Expand All @@ -182,23 +167,17 @@ if "%BSON_ONLY%" NEQ "1" (
echo mongoc-targets.cmake check ok
)
)
if exist %INSTALL_DIR%\include\libbson-1.0\bson\bson.h (
if exist %INSTALL_DIR%\include\bson-%version%\bson\bson.h (
echo bson\bson.h found!
exit /B 1
) else (
echo bson\bson.h check ok
)
if exist %INSTALL_DIR%\include\libbson-1.0\bson.h (
echo bson.h found!
exit /B 1
) else (
echo bson.h check ok
)
if exist %INSTALL_DIR%\include\libbson-1.0 (
echo $INSTALL_DIR\include\libbson-1.0 found!
if exist %INSTALL_DIR%\include\bson-%version% (
echo $INSTALL_DIR\include\bson-%version% found!
exit /B 1
) else (
echo $INSTALL_DIR\include\libbson-1.0 check ok
echo $INSTALL_DIR\include\bson-%version% check ok
)
if "%BSON_ONLY%" NEQ "1" (
if exist %INSTALL_DIR%\include\libmongoc-1.0\mongoc\mongoc.h (
Expand Down
51 changes: 26 additions & 25 deletions .evergreen/scripts/install-uninstall-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,21 @@ CMAKE=$(find_cmake_latest)
. $DIR/check-symlink.sh
SRCROOT=$(pwd)

# The major version of the project. Appears in certain install filenames.
_full_version=$(cat "$DIR/../../VERSION_CURRENT")
version="${_full_version%-*}" # 1.2.3-dev → 1.2.3
major="${version%%.*}" # 1.2.3 → 1
echo "major version: $major"
echo " full version: $version"

# Use ccache if able.
. $DIR/find-ccache.sh
find_ccache_and_export_vars "$(pwd)" || true

SCRATCH_DIR=$(pwd)/.scratch
rm -rf "$SCRATCH_DIR"
mkdir -p "$SCRATCH_DIR"
cp -vr -- "$SRCROOT"/* "$SCRATCH_DIR"
cp -r -- "$SRCROOT"/* "$SCRATCH_DIR"

if [ "$BSON_ONLY" ]; then
BUILD_DIR=$SCRATCH_DIR/build-dir-bson
Expand Down Expand Up @@ -58,8 +65,8 @@ if [[ -f $DIR/find-ccache.sh ]]; then
find_ccache_and_export_vars "$SCRATCH_DIR" || true
fi

$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DCMAKE_PREFIX_PATH=$INSTALL_DIR/lib/cmake $BSON_ONLY_OPTION "$SCRATCH_DIR"
$CMAKE --build .
$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DBUILD_TESTING=OFF -DCMAKE_PREFIX_PATH=$INSTALL_DIR/lib/cmake $BSON_ONLY_OPTION "$SCRATCH_DIR"
$CMAKE --build . --parallel
if [ "$DESTDIR" ]; then
DESTDIR=$DESTDIR $CMAKE --build . --target install
else
Expand Down Expand Up @@ -93,29 +100,23 @@ $CMAKE --build . --target uninstall

set +o xtrace

if test -f $INSTALL_DIR/lib/pkgconfig/libbson-1.0.pc; then
echo "libbson-1.0.pc found!"
exit 1
else
echo "libbson-1.0.pc check ok"
fi
if test -f $INSTALL_DIR/lib/cmake/bson-1.0/bson-1.0-config.cmake; then
echo "bson-1.0-config.cmake found!"
if test -f $INSTALL_DIR/lib/pkgconfig/bson$major.pc; then
echo "bson$major.pc found!"
exit 1
else
echo "bson-1.0-config.cmake check ok"
echo "bson$major.pc check ok"
fi
if test -f $INSTALL_DIR/lib/cmake/bson-1.0/bson-1.0-config-version.cmake; then
echo "bson-1.0-config-version.cmake found!"
if test -f $INSTALL_DIR/lib/cmake/bson-$version/bsonConfig.cmake; then
echo "bsonConfig.cmake found!"
exit 1
else
echo "bson-1.0-config-version.cmake check ok"
echo "bsonConfig.cmake check ok"
fi
if test -f $INSTALL_DIR/lib/cmake/bson-1.0/bson-targets.cmake; then
echo "bson-targets.cmake found!"
if test -f $INSTALL_DIR/lib/cmake/bson-$version/bsonConfigVersion.cmake; then
echo "bsonConfigVersion.cmake found!"
exit 1
else
echo "bson-targets.cmake check ok"
echo "bsonConfigVersion.cmake check ok"
fi
if test ! -f $INSTALL_DIR/lib/canary.txt; then
echo "canary.txt not found!"
Expand All @@ -130,11 +131,11 @@ else
echo "$INSTALL_DIR/lib check ok"
fi
if [ -z "$BSON_ONLY" ]; then
if test -f $INSTALL_DIR/lib/pkgconfig/libmongoc-1.0.pc; then
echo "libmongoc-1.0.pc found!"
if test -f $INSTALL_DIR/lib/pkgconfig/mongoc$major.pc; then
echo "mongoc$major.pc found!"
exit 1
else
echo "libmongoc-1.0.pc check ok"
echo "mongoc$major.pc check ok"
fi
if test -f $INSTALL_DIR/lib/cmake/mongoc-1.0/mongoc-1.0-config.cmake; then
echo "mongoc-1.0-config.cmake found!"
Expand All @@ -155,17 +156,17 @@ if [ -z "$BSON_ONLY" ]; then
echo "mongoc-targets.cmake check ok"
fi
fi
if test -f $INSTALL_DIR/include/libbson-1.0/bson/bson.h; then
if test -f $INSTALL_DIR/include/bson-$version/bson/bson.h; then
echo "bson/bson.h found!"
exit 1
else
echo "bson/bson.h check ok"
fi
if test -d $INSTALL_DIR/include/libbson-1.0; then
echo "$INSTALL_DIR/include/libbson-1.0 found!"
if test -d $INSTALL_DIR/include/bson-$version; then
echo "$INSTALL_DIR/include/bson-$version found!"
exit 1
else
echo "$INSTALL_DIR/include/libbson-1.0 check ok"
echo "$INSTALL_DIR/include/bson-$version check ok"
fi
if [ -z "$BSON_ONLY" ]; then
if test -f $INSTALL_DIR/include/libmongoc-1.0/mongoc/mongoc.h; then
Expand Down
Loading