diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6f403af..4ced28a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -72,7 +72,7 @@ SET(FREEGLUT_HEADERS
     include/GL/freeglut_ext.h
     include/GL/freeglut_std.h
 )
-IF(FREEGLUT_REPLACE_GLUT)
+IF(TRUE)
     LIST(APPEND FREEGLUT_HEADERS
         include/GL/glut.h
     )
@@ -312,8 +312,7 @@ ENDIF(CMAKE_COMPILER_IS_GNUCC)
 INCLUDE(CheckIncludeFiles)
 IF(UNIX AND NOT(ANDROID OR BLACKBERRY OR FREEGLUT_WAYLAND))
     FIND_PACKAGE(X11 REQUIRED)
-    INCLUDE_DIRECTORIES(${X11_X11_INCLUDE_PATH})
-    LIST(APPEND LIBS ${X11_X11_LIB})
+    LIST(APPEND LIBS X11::X11)
     IF(X11_Xrandr_FOUND)
         SET(HAVE_X11_EXTENSIONS_XRANDR_H TRUE)
         LIST(APPEND LIBS ${X11_Xrandr_LIB})
