Fixes building without PAM
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9892c1d..eb1608b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -222,7 +222,9 @@ endif(BUILD_SLIMLOCK)
 ####### install
 # slim
 install(TARGETS slim RUNTIME DESTINATION bin)
-install(TARGETS slimlock RUNTIME DESTINATION bin)
+if(BUILD_SLIMLOCK)
+    install(TARGETS slimlock RUNTIME DESTINATION bin)
+endif(BUILD_SLIMLOCK)
 
 if (BUILD_SHARED_LIBS)
 	set_target_properties(libslim PROPERTIES
