diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e0a06f6..10d4fb36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,12 +25,12 @@ option(FMT_INSTALL "Generate the install 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) -project(FORMAT) +project(FMT) # Starting with cmake 3.0 VERSION is part of the project command. -set(CPPFORMAT_VERSION 2.1.2) -if (NOT CPPFORMAT_VERSION MATCHES "^([0-9]+).([0-9]+).([0-9]+)$") - message(FATAL_ERROR "Invalid version format ${CPPFORMAT_VERSION}.") +set(FMT_VERSION 2.1.2) +if (NOT FMT_VERSION MATCHES "^([0-9]+).([0-9]+).([0-9]+)$") + message(FATAL_ERROR "Invalid version format ${FMT_VERSION}.") endif () set(CPACK_PACKAGE_VERSION_MAJOR ${CMAKE_MATCH_1}) 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_IGNORE_FILES ${ignored_files}) - set(CPACK_SOURCE_PACKAGE_FILE_NAME cppformat-${CPPFORMAT_VERSION}) - set(CPACK_PACKAGE_NAME cppformat) + set(CPACK_SOURCE_PACKAGE_FILE_NAME fmt-${FMT_VERSION}) + set(CPACK_PACKAGE_NAME fmt) set(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.rst) include(CPack) endif () diff --git a/cppformat/CMakeLists.txt b/cppformat/CMakeLists.txt index 323bb338..68a8aaad 100644 --- a/cppformat/CMakeLists.txt +++ b/cppformat/CMakeLists.txt @@ -19,7 +19,7 @@ target_include_directories(cppformat INTERFACE $) 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 (UNIX AND NOT APPLE) @@ -62,7 +62,7 @@ if (FMT_INSTALL) # Generate the version, config and target files into the build directory. write_basic_package_version_file( ${version_config} - VERSION ${CPPFORMAT_VERSION} + VERSION ${FMT_VERSION} COMPATIBILITY AnyNewerVersion) configure_package_config_file( ${PROJECT_SOURCE_DIR}/support/cmake/cppformat-config.cmake.in diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index f529262b..63a03900 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -5,7 +5,7 @@ if (NOT DOXYGEN) endif () 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/ DESTINATION share/doc/cppformat) diff --git a/support/release.py b/support/release.py index d0be7771..e1503994 100755 --- a/support/release.py +++ b/support/release.py @@ -146,7 +146,7 @@ if __name__ == '__main__': changes, version = core.publish_file(source_path=changelog_path, writer=MDWriter()) cmakelists = 'CMakeLists.txt' 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): line = prefix + version + ')\n' sys.stdout.write(line)