mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-31 19:24:48 +02:00
Implement packaging.
This commit is contained in:
21
.gitignore
vendored
21
.gitignore
vendored
@@ -1,11 +1,16 @@
|
|||||||
|
/_CPack_Packages
|
||||||
|
/doc/conf.py
|
||||||
|
/doc/doxyxml
|
||||||
|
/doc/html
|
||||||
|
/Testing
|
||||||
|
/*.cmake
|
||||||
|
/format-test
|
||||||
|
/install_manifest.txt
|
||||||
|
/tinyformat_speed_test
|
||||||
|
*~
|
||||||
|
*.a
|
||||||
|
*.zip
|
||||||
|
cmake_install.cmake
|
||||||
CMakeCache.txt
|
CMakeCache.txt
|
||||||
CMakeFiles
|
CMakeFiles
|
||||||
cmake_install.cmake
|
|
||||||
Makefile
|
Makefile
|
||||||
/CTestTestfile.cmake
|
|
||||||
/doc/doxyxml
|
|
||||||
/format_test
|
|
||||||
/html
|
|
||||||
/libformat.a
|
|
||||||
/Testing
|
|
||||||
*~
|
|
||||||
|
@@ -135,3 +135,26 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/format-benchmark/tinyformat_test.cpp)
|
|||||||
WORKING_DIRECTORY tinyformat
|
WORKING_DIRECTORY tinyformat
|
||||||
DEPENDS format)
|
DEPENDS format)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (EXISTS .gitignore)
|
||||||
|
# Get the list of ignored files from .gitignore.
|
||||||
|
file (STRINGS ".gitignore" lines)
|
||||||
|
LIST(REMOVE_ITEM lines /doc/html)
|
||||||
|
foreach (line ${lines})
|
||||||
|
string(REPLACE "*" ".*" line "${line}")
|
||||||
|
set(ignored_files ${ignored_files} "${line}$" "${line}/")
|
||||||
|
endforeach ()
|
||||||
|
set(ignored_files ${ignored_files} /.git /breathe /format-benchmark /gtest)
|
||||||
|
|
||||||
|
set(CPACK_SOURCE_GENERATOR ZIP)
|
||||||
|
set(CPACK_SOURCE_IGNORE_FILES ${ignored_files})
|
||||||
|
set(CPACK_PACKAGE_VERSION_MAJOR 0)
|
||||||
|
set(CPACK_PACKAGE_VERSION_MINOR 8)
|
||||||
|
set(CPACK_PACKAGE_VERSION_PATCH 0)
|
||||||
|
set(CPACK_SOURCE_PACKAGE_FILE_NAME
|
||||||
|
format-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-src)
|
||||||
|
set(CPACK_RESOURCE_FILE_README ${FORMAT_SOURCE_DIR}/README.rst)
|
||||||
|
include(CPack)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
configure_file(doc/conf.py.in doc/conf.py @ONLY)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
add_custom_command(OUTPUT html/index.html
|
add_custom_command(OUTPUT html/index.html
|
||||||
COMMAND doxygen
|
COMMAND doxygen
|
||||||
COMMAND rm -rf ../html
|
COMMAND rm -rf html
|
||||||
COMMAND sphinx-build -b html . ../html
|
COMMAND sphinx-build -b html . html
|
||||||
DEPENDS conf.py index.rst)
|
DEPENDS conf.py index.rst)
|
||||||
add_custom_target(doc DEPENDS html/index.html)
|
add_custom_target(doc DEPENDS html/index.html)
|
||||||
|
@@ -54,7 +54,7 @@ copyright = u'1990-2012, Python Software Foundation'
|
|||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '0.8'
|
version = '@CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = version
|
release = version
|
||||||
|
|
Reference in New Issue
Block a user