CPPFORMAT_VERSION -> FMT_VERSION
This commit is contained in:
parent
c7d9d79ad2
commit
848ab63a2a
@ -25,12 +25,12 @@ option(FMT_INSTALL "Generate the install target." ${MASTER_PROJECT})
|
|||||||
option(FMT_TEST "Generate the test target." ${MASTER_PROJECT})
|
option(FMT_TEST "Generate the test target." ${MASTER_PROJECT})
|
||||||
option(FMT_USE_CPP11 "Enable the addition of C++11 compiler flags." ON)
|
option(FMT_USE_CPP11 "Enable the addition of C++11 compiler flags." ON)
|
||||||
|
|
||||||
project(FORMAT)
|
project(FMT)
|
||||||
|
|
||||||
# Starting with cmake 3.0 VERSION is part of the project command.
|
# Starting with cmake 3.0 VERSION is part of the project command.
|
||||||
set(CPPFORMAT_VERSION 2.1.2)
|
set(FMT_VERSION 2.1.2)
|
||||||
if (NOT CPPFORMAT_VERSION MATCHES "^([0-9]+).([0-9]+).([0-9]+)$")
|
if (NOT FMT_VERSION MATCHES "^([0-9]+).([0-9]+).([0-9]+)$")
|
||||||
message(FATAL_ERROR "Invalid version format ${CPPFORMAT_VERSION}.")
|
message(FATAL_ERROR "Invalid version format ${FMT_VERSION}.")
|
||||||
endif ()
|
endif ()
|
||||||
set(CPACK_PACKAGE_VERSION_MAJOR ${CMAKE_MATCH_1})
|
set(CPACK_PACKAGE_VERSION_MAJOR ${CMAKE_MATCH_1})
|
||||||
set(CPACK_PACKAGE_VERSION_MINOR ${CMAKE_MATCH_2})
|
set(CPACK_PACKAGE_VERSION_MINOR ${CMAKE_MATCH_2})
|
||||||
@ -98,8 +98,8 @@ if (MASTER_PROJECT AND EXISTS ${gitignore})
|
|||||||
|
|
||||||
set(CPACK_SOURCE_GENERATOR ZIP)
|
set(CPACK_SOURCE_GENERATOR ZIP)
|
||||||
set(CPACK_SOURCE_IGNORE_FILES ${ignored_files})
|
set(CPACK_SOURCE_IGNORE_FILES ${ignored_files})
|
||||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME cppformat-${CPPFORMAT_VERSION})
|
set(CPACK_SOURCE_PACKAGE_FILE_NAME fmt-${FMT_VERSION})
|
||||||
set(CPACK_PACKAGE_NAME cppformat)
|
set(CPACK_PACKAGE_NAME fmt)
|
||||||
set(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.rst)
|
set(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.rst)
|
||||||
include(CPack)
|
include(CPack)
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -19,7 +19,7 @@ target_include_directories(cppformat INTERFACE
|
|||||||
$<INSTALL_INTERFACE:include>)
|
$<INSTALL_INTERFACE:include>)
|
||||||
|
|
||||||
set_target_properties(cppformat PROPERTIES
|
set_target_properties(cppformat PROPERTIES
|
||||||
VERSION ${CPPFORMAT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR})
|
VERSION ${FMT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR})
|
||||||
|
|
||||||
if (BUILD_SHARED_LIBS)
|
if (BUILD_SHARED_LIBS)
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE)
|
||||||
@ -62,7 +62,7 @@ if (FMT_INSTALL)
|
|||||||
# Generate the version, config and target files into the build directory.
|
# Generate the version, config and target files into the build directory.
|
||||||
write_basic_package_version_file(
|
write_basic_package_version_file(
|
||||||
${version_config}
|
${version_config}
|
||||||
VERSION ${CPPFORMAT_VERSION}
|
VERSION ${FMT_VERSION}
|
||||||
COMPATIBILITY AnyNewerVersion)
|
COMPATIBILITY AnyNewerVersion)
|
||||||
configure_package_config_file(
|
configure_package_config_file(
|
||||||
${PROJECT_SOURCE_DIR}/support/cmake/cppformat-config.cmake.in
|
${PROJECT_SOURCE_DIR}/support/cmake/cppformat-config.cmake.in
|
||||||
|
@ -5,7 +5,7 @@ if (NOT DOXYGEN)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
add_custom_target(doc
|
add_custom_target(doc
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build.py ${CPPFORMAT_VERSION})
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build.py ${FMT_VERSION})
|
||||||
|
|
||||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
|
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
|
||||||
DESTINATION share/doc/cppformat)
|
DESTINATION share/doc/cppformat)
|
||||||
|
@ -146,7 +146,7 @@ if __name__ == '__main__':
|
|||||||
changes, version = core.publish_file(source_path=changelog_path, writer=MDWriter())
|
changes, version = core.publish_file(source_path=changelog_path, writer=MDWriter())
|
||||||
cmakelists = 'CMakeLists.txt'
|
cmakelists = 'CMakeLists.txt'
|
||||||
for line in fileinput.input(os.path.join(cppformat_dir, cmakelists), inplace=True):
|
for line in fileinput.input(os.path.join(cppformat_dir, cmakelists), inplace=True):
|
||||||
prefix = 'set(CPPFORMAT_VERSION '
|
prefix = 'set(FMT_VERSION '
|
||||||
if line.startswith(prefix):
|
if line.startswith(prefix):
|
||||||
line = prefix + version + ')\n'
|
line = prefix + version + ')\n'
|
||||||
sys.stdout.write(line)
|
sys.stdout.write(line)
|
||||||
|
Loading…
Reference in New Issue
Block a user