Skip to content

Commit e948abd

Browse files
committed
cmake: Added an option to disable adding of example targets
1 parent ef58c8b commit e948abd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ include_guard()
22

33
cmake_minimum_required (VERSION 3.15...3.20)
44

5+
# Add a build option for enabling examples
6+
option(TE_ADD_EXAMPLES "Add the example targets" ON)
7+
58
file(READ VERSION.md CURRENT_VERSION)
69
project(tracktion
710
VERSION ${CURRENT_VERSION}
@@ -20,5 +23,7 @@ endif()
2023

2124
add_subdirectory(modules)
2225

23-
enable_testing()
24-
add_subdirectory(examples)
26+
if (TE_ADD_EXAMPLES)
27+
enable_testing()
28+
add_subdirectory(examples)
29+
endif()

0 commit comments

Comments
 (0)