diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2024-07-03 10:19:36 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2024-07-03 10:19:36 +0200 |
commit | b6bd52cd7330a90fc0e44dbe6022551a8dd768a1 (patch) | |
tree | 9804282102f8c40d27407b9c94119b35eeb5013c /app/help/CMakeLists.txt | |
parent | c9d0740841fbe0539e42e66d3865672bfcd3ac02 (diff) | |
parent | a14a7a0ccc9de76aeab0b2e4bbf58f1a79deedc2 (diff) |
Update upstream source from tag 'upstream/5.3.0GA'
Update to upstream version '5.3.0GA'
with Debian dir dfd14d63b0238e276ade6f54dd9100325df5b2f9
Diffstat (limited to 'app/help/CMakeLists.txt')
-rw-r--r-- | app/help/CMakeLists.txt | 78 |
1 files changed, 62 insertions, 16 deletions
diff --git a/app/help/CMakeLists.txt b/app/help/CMakeLists.txt index 34c8d33..efc7b23 100644 --- a/app/help/CMakeLists.txt +++ b/app/help/CMakeLists.txt @@ -1,26 +1,72 @@ -PROJECT(help) +project(messagefile) -ADD_EXECUTABLE(genhelp genhelp.c cJSON.c cJSON.h) +# +# genhelp is used in ..\bin to generate the tooltip texts -ADD_EXECUTABLE(genmessages genmessages.c) +add_executable(genhelp "") +target_sources(genhelp + PRIVATE + genhelp.c) -IF(XTRKCAD_USE_GETTEXT) - SET(GENMESSAGES_OPTS "-i18n") -ELSE(XTRKCAD_USE_GETTEXT) - SET(GENMESSAGES_OPTS "") -ENDIF(XTRKCAD_USE_GETTEXT) +target_link_libraries(genhelp + PUBLIC + cJSON +) -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/messages.h ${CMAKE_CURRENT_BINARY_DIR}/messages.but +# +# interpreter for message source file + +add_executable(genmessages "") + +target_sources(genmessages PUBLIC + genmessages.c +) + +set_source_files_properties( + genhelp.json messages.in xtrkcad.tip + PROPERTIES HEADER_FILE_ONLY TRUE +) + +# +# Generate message include file and the input file for the help system + +if(XTRKCAD_USE_GETTEXT) + set(GENHELP_OPTS "-bhi" ) + set(GENMESSAGES_OPTS "-i18n") +else() + set(GENHELP_OPTS "-bh" ) + set(GENMESSAGES_OPTS "") +endif() + +add_custom_command( + OUTPUT bllnhlp.c + DEPENDS genhelp genhelp.json + COMMAND genhelp ${GENHELP_OPTS} ${CMAKE_CURRENT_SOURCE_DIR}/genhelp.json ${CMAKE_CURRENT_BINARY_DIR}/bllnhlp.c +) + +add_custom_target(balloonhelp ALL + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/bllnhlp.c +) + +add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/messages.h ${CMAKE_CURRENT_BINARY_DIR}/messages.but DEPENDS genmessages ${CMAKE_CURRENT_SOURCE_DIR}/messages.in - COMMAND genmessages ${GENMESSAGES_OPTS} ${CMAKE_CURRENT_SOURCE_DIR}/messages.in ${CMAKE_CURRENT_BINARY_DIR}/messages.but - ) + COMMAND genmessages ${GENMESSAGES_OPTS} ${CMAKE_CURRENT_SOURCE_DIR}/messages.in ${CMAKE_CURRENT_BINARY_DIR}/messages.but +) -ADD_CUSTOM_TARGET(Help ALL +add_custom_target(msgfiles ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/messages.h ${CMAKE_CURRENT_BINARY_DIR}/messages.but - ) +) -INSTALL( +install( FILES xtrkcad.tip DESTINATION ${XTRKCAD_SHARE_INSTALL_DIR} - ) +) + +set_target_properties( + msgfiles + balloonhelp + genmessages + genhelp + PROPERTIES FOLDER HelpDocs +)
\ No newline at end of file |