2018-05-03 16:18:15 -05:00
|
|
|
add_subdirectory(examples)
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
set(doc_DATA
|
2018-02-03 12:59:40 -06:00
|
|
|
gtk-3.0.css
|
2015-12-07 11:17:08 -06:00
|
|
|
)
|
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
set(doc_noinst_DATA
|
2019-06-29 16:10:23 -05:00
|
|
|
CMakeLists.txt gnc-fq-dump.1 gnc-fq-helper.1 gnucash.1.in
|
2020-06-05 13:13:34 -05:00
|
|
|
gnucash-cli.1.in tip_of_the_day.list.c README.txt)
|
2017-02-01 21:48:46 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
install(FILES ${doc_DATA} DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
set_local_dist(doc_DIST_local ${doc_DATA} ${doc_noinst_DATA})
|
|
|
|
set(doc_DIST ${doc_DIST_local} ${examples_DIST} PARENT_SCOPE)
|
2017-02-01 21:48:46 -06:00
|
|
|
|
2020-04-19 12:33:07 -05:00
|
|
|
foreach(doc_file ${doc_DATA})
|
|
|
|
configure_file(${doc_file} ${DATADIR_BUILD}/doc/gnucash/${doc_file} COPYONLY)
|
|
|
|
endforeach()
|
2015-12-07 11:17:08 -06:00
|
|
|
|
|
|
|
# Generate the tip of the day file.
|
|
|
|
|
2021-03-17 10:19:07 -05:00
|
|
|
set (totd "tip_of_the_day.list")
|
|
|
|
add_custom_command(OUTPUT ${DATADIR_BUILD}/gnucash/${totd}
|
|
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${totd}.c
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
COMMAND ${CMAKE_COMMAND}
|
|
|
|
-D SRC=${CMAKE_CURRENT_SOURCE_DIR}/${totd}.c
|
|
|
|
-D TOTD=${totd}
|
|
|
|
-D DST_DIR=${DATADIR_BUILD}/gnucash
|
|
|
|
-D CMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/cmake/configure-totd.cmake
|
2015-12-07 11:17:08 -06:00
|
|
|
)
|
2021-03-17 10:19:07 -05:00
|
|
|
add_custom_target(totd ALL DEPENDS ${DATADIR_BUILD}/gnucash/${totd})
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2021-03-17 10:19:07 -05:00
|
|
|
install(FILES ${DATADIR_BUILD}/gnucash/tip_of_the_day.list DESTINATION ${CMAKE_INSTALL_DATADIR}/gnucash)
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2021-03-17 10:19:07 -05:00
|
|
|
# Generate manpages.
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2020-06-05 13:13:34 -05:00
|
|
|
foreach (manpage gnucash gnucash-cli)
|
2021-03-17 10:19:07 -05:00
|
|
|
add_custom_command(OUTPUT ${DATADIR_BUILD}/gnucash/${manpage}.1
|
|
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${manpage}.1.in ${VCS_INFO_FILE}
|
|
|
|
COMMAND ${CMAKE_COMMAND}
|
|
|
|
-D SRC=${CMAKE_CURRENT_SOURCE_DIR}/${manpage}.1.in
|
|
|
|
-D DST=${manpage}.1
|
|
|
|
-D VCS_INFO_FILE=${VCS_INFO_FILE}
|
|
|
|
-D DATADIR_BUILD=${DATADIR_BUILD}
|
|
|
|
-D SRC_DIR=${CMAKE_SOURCE_DIR}
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/cmake/configure-manpage.cmake
|
2020-06-05 13:13:34 -05:00
|
|
|
)
|
2021-03-17 10:19:07 -05:00
|
|
|
add_custom_target(${manpage}-manpage ALL DEPENDS ${DATADIR_BUILD}/gnucash/${manpage}.1)
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2021-03-17 10:19:07 -05:00
|
|
|
install(FILES ${DATADIR_BUILD}/gnucash/${manpage}.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
2020-06-05 13:32:14 -05:00
|
|
|
endforeach()
|