diff options
Diffstat (limited to 'app/doc/CMakeLists.txt')
-rw-r--r-- | app/doc/CMakeLists.txt | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/app/doc/CMakeLists.txt b/app/doc/CMakeLists.txt index dcee056..03ac14b 100644 --- a/app/doc/CMakeLists.txt +++ b/app/doc/CMakeLists.txt @@ -38,7 +38,11 @@ ADD_CUSTOM_TARGET(clean-html # If we're using the GTK back-end, just generate "vanilla" HTML help files for use with gtkhtml IF(XTRKCAD_USE_GTK) - SET(HALIBUT_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/linconf.but ${HALIBUT_SOURCES}) + IF (APPLE) + SET(HALIBUT_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/osxconf.but ${HALIBUT_SOURCES}) + ELSE(APPLE) + SET(HALIBUT_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/linconf.but ${HALIBUT_SOURCES}) + ENDIF(APPLE) ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/index.html @@ -63,7 +67,31 @@ IF(XTRKCAD_USE_GTK) INSTALL( FILES xtrkcad_lin.css DESTINATION ${XTRKCAD_SHARE_INSTALL_DIR}/html - ) + ) +# Copy the help files to the Help bundle if Apple + IF (APPLE) + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/XTrackCAD.helpindex + DEPENDS help-html ${HALIBUT_SOURCES} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html + COMMAND hiutil -Cf XTrackCAD.helpindex -gva -e "IndexPage.html" -e "toc.html" ${CMAKE_CURRENT_BINARY_DIR}/html + ) + + ADD_CUSTOM_TARGET(help-index ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/XTrackCAD.helpindex) + + INSTALL( + DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ + DESTINATION ${XTRKCAD_SHARE_INSTALL_DIR}/XTrackCAD.help/Contents/Resources/en.lproj + ) + INSTALL( + DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/png.d + DESTINATION ${XTRKCAD_SHARE_INSTALL_DIR}/XTrackCAD.help/Contents/Resources/en.lproj + ) + INSTALL( + FILES xtrkcad_osx.css + DESTINATION ${XTRKCAD_SHARE_INSTALL_DIR}/XTrackCAD.help/Contents/Resources/en.lproj + ) + ENDIF(APPLE) # Otherwise, we're using the Win32 back-end, so generate a compiled HTML help file ELSE(XTRKCAD_USE_GTK) @@ -86,7 +114,7 @@ ELSE(XTRKCAD_USE_GTK) INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/html/xtrkcad.chm - DESTINATION ${XTRKCAD_SHARE_INSTALL_DIR} + DESTINATION ${XTRKCAD_SHARE_INSTALL_DIR} ) ENDIF(XTRKCAD_USE_GTK) |