Skip to content

CXX-2751 Fix reference to VERSION_CURRENT file in distribution list #1020

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 1 commit into from
Sep 13, 2023
Merged
Changes from all commits
Commits
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
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,13 @@ set(CMAKE_MODULE_PATH
include(GNUInstallDirs)
include (ParseVersion)

set(MONGOCXX_CURRENT_VERSION_FILE "")
if(BUILD_VERSION STREQUAL "0.0.0")
if(EXISTS ${CMAKE_BINARY_DIR}/VERSION_CURRENT)
file(STRINGS ${CMAKE_BINARY_DIR}/VERSION_CURRENT BUILD_VERSION)
elseif(EXISTS ${PROJECT_SOURCE_DIR}/build/VERSION_CURRENT)
file(STRINGS ${PROJECT_SOURCE_DIR}/build/VERSION_CURRENT BUILD_VERSION)
set(MONGOCXX_CURRENT_VERSION_FILE ${PROJECT_SOURCE_DIR}/build/VERSION_CURRENT)
file(STRINGS ${MONGOCXX_CURRENT_VERSION_FILE} BUILD_VERSION)
else()
find_package(PythonInterp)
if(PYTHONINTERP_FOUND)
Expand Down Expand Up @@ -377,7 +379,7 @@ set (top_DIST_local
README.md
THIRD-PARTY-NOTICES
build/.gitignore
build/VERSION_CURRENT
${MONGOCXX_CURRENT_VERSION_FILE}
# This sub-directory is added later, so manually include here
generate_uninstall/CMakeLists.txt
)
Expand Down Expand Up @@ -458,4 +460,3 @@ endif ()
if (CMAKE_GENERATOR_TOOLSET)
message (STATUS "\tinstance: ${CMAKE_GENERATOR_TOOLSET}")
endif ()