File tree 1 file changed +18
-4
lines changed
1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -283,17 +283,31 @@ if(PHYSFS_BUILD_DOCS)
283
283
file (APPEND "${PHYSFS_OUTPUT_DOXYFILE} " "\n\n # Below auto-generated by cmake...\n\n " )
284
284
file (APPEND "${PHYSFS_OUTPUT_DOXYFILE} " "PROJECT_NUMBER = \" ${PHYSFS_VERSION} \"\n " )
285
285
file (APPEND "${PHYSFS_OUTPUT_DOXYFILE} " "OUTPUT_DIRECTORY = \" ${CMAKE_CURRENT_BINARY_DIR} /docs\"\n " )
286
+ file (APPEND "${PHYSFS_OUTPUT_DOXYFILE} " "INPUT = \" ${CMAKE_CURRENT_SOURCE_DIR} /include\"\n " )
286
287
file (APPEND "${PHYSFS_OUTPUT_DOXYFILE} " "\n # End auto-generated section.\n\n " )
287
288
288
289
set (PHYSFS_TARGETNAME_DOCS "docs" CACHE STRING "Name of 'docs' build target" )
289
290
290
- add_custom_target (
291
- ${PHYSFS_TARGETNAME_DOCS}
292
- ${DOXYGEN_EXECUTABLE} "${PHYSFS_OUTPUT_DOXYFILE} "
293
- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} "
291
+ add_custom_command (
292
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR} /docs/html/index.html"
293
+ COMMAND ${DOXYGEN_EXECUTABLE} "${PHYSFS_OUTPUT_DOXYFILE} "
294
294
COMMENT "Building documentation in 'docs' directory..."
295
+ DEPENDS "${CMAKE_CURRENT_SOURCE_DIR} /include/physfs.h" "${CMAKE_CURRENT_SOURCE_DIR} /docs/Doxyfile"
295
296
)
296
297
298
+ add_custom_target (${PHYSFS_TARGETNAME_DOCS} ALL
299
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR} /docs/html/index.html"
300
+ )
301
+
302
+ if (NOT PHYSFS_DISABLE_INSTALL)
303
+ install (DIRECTORY "${CMAKE_CURRENT_BINARY_DIR} /docs/html"
304
+ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR} /doc/physfs"
305
+ )
306
+ install (DIRECTORY "${CMAKE_CURRENT_BINARY_DIR} /docs/man"
307
+ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR} "
308
+ )
309
+ endif ()
310
+
297
311
else ()
298
312
message (STATUS "Doxygen not found. You won't be able to build documentation." )
299
313
endif ()
You can’t perform that action at this time.
0 commit comments