diff --git a/CMakeLists.txt b/CMakeLists.txt
index 32506cd..0fbd454 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1748,7 +1748,7 @@ function(my_install_man COMPONENT SRC_FILE LINK_NAMES)
     endif()
 endfunction()
 
-
+if(BUILD_TOOLS)
 #############################################################################
 # libgnu (getopt_long)
 #############################################################################
@@ -2415,7 +2415,7 @@ xzdiff, xzgrep, xzmore, xzless, and their symlinks" ON)
                        src/scripts/xzless.1 "${XZLESS_LINKS}")
     endif()
 endif()
-
+endif()
 
 #############################################################################
 # Documentation
