Skip to content

Commit

Permalink
Added OTK_BUILD_GUI flag to control building the Gui library.
Browse files Browse the repository at this point in the history
OTK_BUILD_EXAMPLES must also be turned off in order for it to work.
  • Loading branch information
MarkLeone committed Aug 1, 2022
1 parent aa6f836 commit aee9730
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMake/OptiXToolkitConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ find_package(OptiX REQUIRED)
# Import the targets.
include("${_prefix}/cmake/OptiXToolkit/CudaTargets.cmake")
include("${_prefix}/cmake/OptiXToolkit/UtilTargets.cmake")
include("${_prefix}/cmake/OptiXToolkit/GuiTargets.cmake")
include("${_prefix}/cmake/OptiXToolkit/ImageSourceTargets.cmake")
include("${_prefix}/cmake/OptiXToolkit/DemandLoadingTargets.cmake")
include("${_prefix}/cmake/OptiXToolkit/GuiTargets.cmake" OPTIONAL)
15 changes: 10 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,23 @@ install(FILES ${OptiXToolkit_BINARY_DIR}/CMake/OptiXToolkitConfig.cmake
#########################################################
# Subdirectories

option( OTK_BUILD_EXAMPLES "Enable build of OptiXToolkit examples" ON )
option( OTK_BUILD_DOCS "Enable build of OptiXToolkit documentation" ON)
option( OTK_BUILD_GUI "Enable build of Gui library" ON )

if( OTK_BUILD_GUI OR OTK_BUILD_EXAMPLES )
add_subdirectory(Gui)
endif()

add_subdirectory(Cuda)
add_subdirectory(Util)
add_subdirectory(Gui)
add_subdirectory(ImageSource)
add_subdirectory(DemandLoading)

set( OTK_BUILD_EXAMPLES ON CACHE BOOL "Enable build of OptiXToolkit examples" )
if( ${OTK_BUILD_EXAMPLES} )
add_subdirectory(examples)
if( OTK_BUILD_EXAMPLES )
add_subdirectory(examples)
endif()

set( OTK_BUILD_DOCS ON CACHE BOOL "Enable build of OptiXToolkit documentation" )
if( OTK_BUILD_DOCS )
add_subdirectory( docs/API )
endif()

0 comments on commit aee9730

Please sign in to comment.