diff --git a/rdtk/CMakeLists.txt b/rdtk/CMakeLists.txt index 35b005212..063f19576 100644 --- a/rdtk/CMakeLists.txt +++ b/rdtk/CMakeLists.txt @@ -66,8 +66,10 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/include) add_subdirectory(include) add_subdirectory(librdtk) -if(WITH_X11) - add_subdirectory(sample) +if(WITH_SAMPLE) + if(WITH_X11) + add_subdirectory(sample) + endif() endif() # Exporting