diff --git a/CMakeLists.txt b/CMakeLists.txt index 60c71e83..d8c12114 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,9 +91,11 @@ add_subdirectory(3rdParty) # tutorial/samples # ------------------------------------------------------------------ if (OWL_BUILD_SAMPLES) - add_subdirectory(samples) -else() - add_subdirectory(samples EXCLUDE_FROM_ALL) + if(NOT OWL_IS_SUBPROJECT) + add_subdirectory(samples) + else() + add_subdirectory(samples EXCLUDE_FROM_ALL) + endif() endif() if (OWL_IS_SUBPROJECT)