60 lines
1.9 KiB
Diff
60 lines
1.9 KiB
Diff
--- a/src/doc/CMakeLists.txt
|
|
+++ b/src/doc/CMakeLists.txt
|
|
@@ -6,10 +6,11 @@ set (public_docs
|
|
"${OpenImageIO_SOURCE_DIR}/CHANGES.md"
|
|
)
|
|
|
|
-install (FILES ${public_docs}
|
|
- DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
|
- COMPONENT documentation)
|
|
-
|
|
+if (INSTALL_DOCS)
|
|
+ install (FILES ${public_docs}
|
|
+ DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
|
+ COMPONENT documentation)
|
|
+endif()
|
|
|
|
# generate man pages using txt2man and a tiny python script to munge the
|
|
# result of "$tool --help"
|
|
@@ -19,8 +20,7 @@ if (UNIX AND TXT2MAN AND PYTHONINTERP_FO
|
|
message (STATUS "Unix man page documentation will be generated")
|
|
set (cli_tools oiiotool iinfo maketx idiff igrep iconvert)
|
|
|
|
- find_program (IV_FOUND iv)
|
|
- if (IV_FOUND)
|
|
+ if (TARGET iv)
|
|
list (APPEND cli_tools iv)
|
|
endif()
|
|
|
|
@@ -37,7 +37,9 @@ if (UNIX AND TXT2MAN AND PYTHONINTERP_FO
|
|
# force man page build before install
|
|
add_custom_target (man_pages ALL DEPENDS ${manpage_files})
|
|
|
|
+if (INSTALL_DOCS)
|
|
install (FILES ${manpage_files}
|
|
DESTINATION ${CMAKE_INSTALL_MANDIR}
|
|
COMPONENT documentation)
|
|
endif()
|
|
+endif()
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -101,6 +101,9 @@ set (TEX_BATCH_SIZE "" CACHE STRING "For
|
|
set (SOVERSION ${OIIO_VERSION_MAJOR}.${OIIO_VERSION_MINOR}
|
|
CACHE STRING "Set the SO version in the SO name of the output library")
|
|
option (BUILD_OIIOUTIL_ONLY "If ON, will build *only* libOpenImageIO_Util")
|
|
+option (BUILD_DOCS "If ON, build documentation and man pages.")
|
|
+option (INSTALL_DOCS "If ON, install documentation and man pages.")
|
|
+
|
|
|
|
if (NOT OIIO_THREAD_ALLOW_DCLP)
|
|
add_definitions ("-DOIIO_THREAD_ALLOW_DCLP=0")
|
|
@@ -188,7 +191,7 @@ if (USE_PYTHON AND NOT BUILD_OIIOUTIL_ON
|
|
endif ()
|
|
|
|
add_subdirectory (src/include)
|
|
-if (INSTALL_DOCS)
|
|
+if (BUILD_DOCS)
|
|
add_subdirectory (src/doc)
|
|
endif ()
|
|
add_subdirectory (src/fonts)
|