diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2024-11-14 19:35:45 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2024-11-14 19:35:45 +0100 |
commit | df5520aa2dae5b3ce7abf8733dcdd152898af163 (patch) | |
tree | 00d3047bfb14f682bfb5a21010c731ed649bfed7 /app/help/CMakeLists.txt | |
parent | df247efec654e512242e4f4f1b0212034f9e01fe (diff) | |
parent | ec3c0f6f6e7153fa797dc57a0e95779cbc63a23b (diff) |
Merge branch 'release/debian/1_5.3.0GA-1'debian/1_5.3.0GA-1
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 |