Skip to content

Commit

Permalink
Offline documentation, make sure directory exists before writting to it
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrogan committed Mar 20, 2018
1 parent 11b3f66 commit b7398e7
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,39 +1,44 @@
# join offline doc parts
if(WIN32)
EXECUTE_PROCESS(COMMAND powershell gc ${CMAKE_SOURCE_DIR}/src/Doc/freecad.qch.part* -Enc Byte -Read 1024 | sc ${CMAKE_BINARY_DIR}/src/Doc/freecad.qch -Enc Byte)
# gc is an alias for Get-Content, sc is an alias for Set-Content, -Read XXXX can be adjusted up for performance, if the user has insufficient RAM it might fail
else(WIN32)
EXECUTE_PROCESS(COMMAND sh -c "cat ${CMAKE_SOURCE_DIR}/src/Doc/freecad.qch.part* >> ${CMAKE_BINARY_DIR}/src/Doc/freecad.qch" )
endif(WIN32)

add_subdirectory(Build)
add_subdirectory(3rdParty)
add_subdirectory(Base)
add_subdirectory(App)
add_subdirectory(Main)
add_subdirectory(Mod)
add_subdirectory(Ext)
add_subdirectory(Doc)

configure_file(Doc/ThirdPartyLibraries.html
${CMAKE_BINARY_DIR}/doc/ThirdPartyLibraries.html COPYONLY)



if(BUILD_GUI)
add_subdirectory(Gui)
configure_file(Doc/freecad.qhc ${CMAKE_BINARY_DIR}/doc/freecad.qhc COPYONLY)
#configure_file(Doc/freecad.qch ${CMAKE_BINARY_DIR}/doc/freecad.qch COPYONLY)
#configure_file(${CMAKE_BINARY_DIR}/src/Doc/freecad.qch ${CMAKE_BINARY_DIR}/doc/freecad.qch COPYONLY)
# join offline doc parts
if(WIN32)
EXECUTE_PROCESS(COMMAND powershell gc ${CMAKE_SOURCE_DIR}/src/Doc/freecad.qch.part* -Enc Byte -Read 1024 | sc ${CMAKE_BINARY_DIR}/doc/freecad.qch -Enc Byte -Force)
# gc is an alias for Get-Content, sc is an alias for Set-Content,
#-Read XXXX can be adjusted up for performance, if the user has insufficient RAM it might fail
else(WIN32)
EXECUTE_PROCESS(COMMAND sh -c "cat ${CMAKE_SOURCE_DIR}/src/Doc/freecad.qch.part* >> ${CMAKE_BINARY_DIR}/doc/freecad.qch" )
endif(WIN32)
endif(BUILD_GUI)

if(BUILD_TEMPLATE)
add_subdirectory(Tools/_TEMPLATE_)
endif(BUILD_TEMPLATE)

configure_file(Doc/ThirdPartyLibraries.html
${CMAKE_BINARY_DIR}/doc/ThirdPartyLibraries.html COPYONLY)
add_subdirectory(Doc)


if(FREECAD_MAINTAINERS_BUILD AND WIN32)
#add_subdirectory(WindowsInstaller)
endif(FREECAD_MAINTAINERS_BUILD AND WIN32)

INSTALL(FILES
Doc/freecad.qhc
${CMAKE_BINARY_DIR}/src/Doc/freecad.qch
${CMAKE_BINARY_DIR}/doc/freecad.qch
Doc/ThirdPartyLibraries.html
DESTINATION ${CMAKE_INSTALL_DOCDIR}
)
Expand Down

0 comments on commit b7398e7

Please sign in to comment.