blob: 513d37ad6b3b392b477d6e406c55afc371d22b2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ee6fd4..439e26a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -122,6 +122,11 @@ set(EXTRA_DIST
nmake.opt
libtiff-4.pc.in)
+option(BUILD_TOOLS "Build tool executables" ON)
+option(BUILD_DOCS "Build docs" ON)
+option(BUILD_CONTRIB "Build contributed executables" ON)
+option(BUILD_TESTS "Build tests" ON)
+
# These are annoyingly verbose, produce false positives or don't work
# nicely with all supported compiler versions, so are disabled unless
# explicitly enabled.
@@ -719,12 +724,20 @@ endif()
# Process subdirectories
add_subdirectory(port)
add_subdirectory(libtiff)
-add_subdirectory(tools)
-add_subdirectory(test)
-add_subdirectory(contrib)
-add_subdirectory(build)
-add_subdirectory(man)
-add_subdirectory(html)
+if(BUILD_TOOLS)
+ add_subdirectory(tools)
+endif()
+if(BUILD_TESTS)
+ add_subdirectory(test)
+endif()
+if(BUILD_CONTRIB)
+ add_subdirectory(contrib)
+endif()
+if(BUILD_DOCS)
+ add_subdirectory(build)
+ add_subdirectory(man)
+ add_subdirectory(html)
+endif()
#message(STATUS "EXTRA_DIST: ${EXTRA_DIST}")
|