mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-15 03:30:39 -06:00
write_basic_package_version_file: use PROJECT_VERSION
In the write_basic_package_version_file(), the VERSION argument
is now optional. If none is given, it falls back to ${PROJECT_VERSION}.
Alex
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# WRITE_BASIC_CONFIG_VERSION_FILE( filename VERSION major.minor.patch COMPATIBILITY (AnyNewerVersion|SameMajorVersion) )
|
||||
# WRITE_BASIC_CONFIG_VERSION_FILE( filename [VERSION major.minor.patch] COMPATIBILITY (AnyNewerVersion|SameMajorVersion) )
|
||||
#
|
||||
#
|
||||
#
|
||||
@@ -46,7 +46,11 @@ function(WRITE_BASIC_CONFIG_VERSION_FILE _filename)
|
||||
endif()
|
||||
|
||||
if("${CVF_VERSION}" STREQUAL "")
|
||||
message(FATAL_ERROR "No VERSION specified for WRITE_BASIC_CONFIG_VERSION_FILE()")
|
||||
if ("${PROJECT_VERSION}" STREQUAL "")
|
||||
message(FATAL_ERROR "No VERSION specified for WRITE_BASIC_CONFIG_VERSION_FILE()")
|
||||
else()
|
||||
set(CVF_VERSION "${PROJECT_VERSION}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
configure_file("${versionTemplateFile}" "${_filename}" @ONLY)
|
||||
|
||||
Reference in New Issue
Block a user