Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Samples in Subprojects only if OWL_BUILD_SAMPLES is enabled #221

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

deibich
Copy link

@deibich deibich commented May 29, 2024

Allows the user of owl to exclude the samples.

With 3f805af you forced cmake to add the samples as targets even if OWL_BUILD_SAMPLES is OFF . We're using Visual Studio and our cmake view gets cluttered with all those targets.

With this change the samples are not added, when owl is a subproject. If one would like to get the samples OWL_BUILD_SAMPLES must be set beforehand.

Examples tested with Windows and VS.

We don't want the samples but the owl viewer:

find_package(glfw3 CONFIG REQUIRED)
set(owl_dir ${CMAKE_CURRENT_LIST_DIR}/owl)
add_subdirectory(${owl_dir} EXCLUDE_FROM_ALL)
add_subdirectory(${owl_dir}/samples/common)

If one would like to add the samples when owl is a subproject:

set(owl_dir ${CMAKE_CURRENT_LIST_DIR}/owl)
option(OWL_BUILD_SAMPLES ON)
add_subdirectory(${owl_dir} EXCLUDE_FROM_ALL)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant