From c690766fc2b497256a737f2fb4688c648fb022cb Mon Sep 17 00:00:00 2001 From: Rashad Kanavath Date: Fri, 23 Dec 2016 05:50:13 +0100 Subject: [PATCH] CMake: call find_package only if build_utils is enabled --- build/cmake/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt index 9130e00..97b195a 100644 --- a/build/cmake/CMakeLists.txt +++ b/build/cmake/CMakeLists.txt @@ -44,8 +44,10 @@ else () endif () find_package (OpenGL REQUIRED) -find_package (X11) - +#X11 is only required when builing utils/ +if(BUILD_UTILS) + find_package (X11) +endif() set (GLEW_LIBRARIES ${OPENGL_LIBRARIES}) add_definitions (-DGLEW_NO_GLU)