Skip to content

Commit

Permalink
Add CMake flag FORCE_OPENGL_ENABLED
Browse files Browse the repository at this point in the history
  • Loading branch information
clintlombard committed Oct 12, 2022
1 parent 87b3aa3 commit 0aee40d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ option(IPO_ENABLED "Whether to enable interprocedural optimization" ON)
option(CUDA_ENABLED "Whether to enable CUDA, if available" ON)
option(GUI_ENABLED "Whether to enable the graphical UI" ON)
option(OPENGL_ENABLED "Whether to enable OpenGL, if available" ON)
option(FORCE_OPENGL_ENABLED "Force enable OpenGL even if GUI_ENABLED=OFF" OFF)
option(TESTS_ENABLED "Whether to build test binaries" OFF)
option(ASAN_ENABLED "Whether to enable AddressSanitizer flags" OFF)
option(PROFILING_ENABLED "Whether to enable google-perftools linker flags" OFF)
Expand Down Expand Up @@ -131,7 +132,7 @@ if(GUI_ENABLED)
endif()
endif()

if(OPENGL_ENABLED AND NOT GUI_ENABLED)
if(OPENGL_ENABLED AND NOT GUI_ENABLED AND NOT FORCE_OPENGL_ENABLED)
message(STATUS "Disabling GUI will also disable OpenGL")
set(OPENGL_ENABLED OFF)
endif()
Expand Down
2 changes: 0 additions & 2 deletions src/feature/sift.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@
#include <memory>

#include "FLANN/flann.hpp"
#if !defined(GUI_ENABLED) && !defined(CUDA_ENABLED)
#include "GL/glew.h"
#endif
#include "SiftGPU/SiftGPU.h"
#include "VLFeat/covdet.h"
#include "VLFeat/sift.h"
Expand Down

0 comments on commit 0aee40d

Please sign in to comment.