mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-03 20:47:37 +03:00
Add support for Microsoft Visual Studio buildchain
* Use C++17 when using MSVC compiler * Remove unneeded header files and macros * Removed unnecessary Yubikey cmake file * Enhance release tool * Updated INSTALL.md
This commit is contained in:
parent
24a23ce66e
commit
0c6587b5b7
19 changed files with 174 additions and 145 deletions
|
@ -24,39 +24,32 @@ set(OUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
|||
set(REV -a revnumber=${KEEPASSXC_VERSION})
|
||||
|
||||
# Build html documentation on all platforms
|
||||
file(GLOB html_depends ${DOC_DIR}/topics/* ${DOC_DIR}/styles/* ${DOC_DIR}/images/*)
|
||||
add_custom_command(OUTPUT KeePassXC_GettingStarted.html
|
||||
COMMAND ${ASCIIDOCTOR_EXE} -D ${OUT_DIR} -o KeePassXC_GettingStarted.html ${REV} ${DOC_DIR}/GettingStarted.adoc
|
||||
DEPENDS ${html_depends} ${DOC_DIR}/GettingStarted.adoc
|
||||
VERBATIM)
|
||||
add_custom_command(OUTPUT KeePassXC_UserGuide.html
|
||||
COMMAND ${ASCIIDOCTOR_EXE} -D ${OUT_DIR} -o KeePassXC_UserGuide.html ${REV} ${DOC_DIR}/UserGuide.adoc
|
||||
DEPENDS ${html_depends} ${DOC_DIR}/UserGuide.adoc
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
VERBATIM)
|
||||
file(GLOB styles_depends ${DOC_DIR}/styles/*)
|
||||
add_custom_command(OUTPUT KeePassXC_KeyboardShortcuts.html
|
||||
COMMAND ${ASCIIDOCTOR_EXE} -D ${OUT_DIR} -o KeePassXC_KeyboardShortcuts.html ${REV} ${DOC_DIR}/topics/KeyboardShortcuts.adoc
|
||||
DEPENDS ${DOC_DIR}/topics/KeyboardShortcuts.adoc ${styles_depends}
|
||||
# NOTE: Combine into one long command to prevent MSVC from failing to build all docs
|
||||
file(GLOB doc_depends ${DOC_DIR}/*.adoc ${DOC_DIR}/topics/* ${DOC_DIR}/styles/* ${DOC_DIR}/images/*)
|
||||
add_custom_command(
|
||||
OUTPUT KeePassXC_GettingStarted.html KeePassXC_UserGuide.html KeePassXC_KeyboardShortcuts.html
|
||||
COMMAND
|
||||
${ASCIIDOCTOR_EXE} -D ${OUT_DIR} -o KeePassXC_GettingStarted.html ${REV} ${DOC_DIR}/GettingStarted.adoc &&
|
||||
${ASCIIDOCTOR_EXE} -D ${OUT_DIR} -o KeePassXC_UserGuide.html ${REV} ${DOC_DIR}/UserGuide.adoc &&
|
||||
${ASCIIDOCTOR_EXE} -D ${OUT_DIR} -o KeePassXC_KeyboardShortcuts.html ${REV} ${DOC_DIR}/topics/KeyboardShortcuts.adoc
|
||||
DEPENDS ${doc_depends}
|
||||
VERBATIM)
|
||||
|
||||
add_custom_target(docs ALL DEPENDS KeePassXC_GettingStarted.html KeePassXC_UserGuide.html KeePassXC_KeyboardShortcuts.html)
|
||||
|
||||
install(FILES
|
||||
${OUT_DIR}/KeePassXC_GettingStarted.html
|
||||
${OUT_DIR}/KeePassXC_UserGuide.html
|
||||
${OUT_DIR}/KeePassXC_KeyboardShortcuts.html
|
||||
DESTINATION ${DATA_INSTALL_DIR}/docs)
|
||||
${OUT_DIR}/KeePassXC_GettingStarted.html
|
||||
${OUT_DIR}/KeePassXC_UserGuide.html
|
||||
${OUT_DIR}/KeePassXC_KeyboardShortcuts.html
|
||||
DESTINATION ${DATA_INSTALL_DIR}/docs)
|
||||
|
||||
# Build Man Pages on Linux and macOS
|
||||
if(UNIX)
|
||||
add_custom_command(OUTPUT keepassxc.1
|
||||
COMMAND ${ASCIIDOCTOR_EXE} -D ${OUT_DIR} -b manpage ${REV} ${DOC_DIR}/man/keepassxc.1.adoc
|
||||
DEPENDS ${DOC_DIR}/man/keepassxc.1.adoc
|
||||
VERBATIM)
|
||||
add_custom_command(OUTPUT keepassxc-cli.1
|
||||
COMMAND ${ASCIIDOCTOR_EXE} -D ${OUT_DIR} -b manpage ${REV} ${DOC_DIR}/man/keepassxc-cli.1.adoc
|
||||
DEPENDS ${DOC_DIR}/man/keepassxc-cli.1.adoc
|
||||
add_custom_command(OUTPUT keepassxc.1 keepassxc-cli.1
|
||||
COMMAND ${ASCIIDOCTOR_EXE} -D ${OUT_DIR} -b manpage ${REV} ./man/keepassxc.1.adoc
|
||||
COMMAND ${ASCIIDOCTOR_EXE} -D ${OUT_DIR} -b manpage ${REV} ./man/keepassxc-cli.1.adoc
|
||||
DEPENDS ${DOC_DIR}/man/keepassxc.1.adoc ${DOC_DIR}/man/keepassxc-cli.1.adoc
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
VERBATIM)
|
||||
add_custom_target(manpages ALL DEPENDS keepassxc.1 keepassxc-cli.1)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue