diff --git a/fggl/CMakeLists.txt b/fggl/CMakeLists.txt
index 18467d10766f12ec8bbb7ace7a9986d0a4665065..86599c8dc5349dd920e617468966bae8eb57ceb5 100644
--- a/fggl/CMakeLists.txt
+++ b/fggl/CMakeLists.txt
@@ -2,14 +2,9 @@ configure_file(FgglConfig.h.in FgglConfig.h)
 
 add_library(fggl fggl.cpp
 	ecs/ecs.cpp
-	gfx/window.cpp
-	gfx/renderer.cpp
-	gfx/input.cpp
-	gfx/shader.cpp
-	gfx/ogl.cpp
 	data/model.cpp
 	data/procedural.cpp
-	debug/debug.cpp)
+)
 target_include_directories(fggl PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../)
 
 # Graphics backend
@@ -18,5 +13,3 @@ target_link_libraries(fggl glfw)
 
 # Debug backend
 add_subdirectory(debug)
-target_link_libraries(fggl imgui)
-
diff --git a/fggl/debug/CMakeLists.txt b/fggl/debug/CMakeLists.txt
index 139597f9cb07c5d48bed18984ec4747f4b4f3438..50de25c3af8ca1322276f6b3191a98353fd50372 100644
--- a/fggl/debug/CMakeLists.txt
+++ b/fggl/debug/CMakeLists.txt
@@ -1,2 +1,7 @@
 
+target_sources(fggl
+    PRIVATE
+	debug.cpp
+)
 
+target_link_libraries(fggl imgui)
diff --git a/fggl/gfx/CMakeLists.txt b/fggl/gfx/CMakeLists.txt
index d2ff4af30e33ba6208baa06a9c65d4a87349c607..961857887e88901d4ec059d044e0f45ce0aaa1d2 100644
--- a/fggl/gfx/CMakeLists.txt
+++ b/fggl/gfx/CMakeLists.txt
@@ -1,4 +1,14 @@
 
+# Sources
+target_sources(fggl
+    PRIVATE
+	window.cpp
+	renderer.cpp
+	input.cpp
+	shader.cpp
+	ogl.cpp
+)
+
 # OpenGL Backend
 find_package( OpenGL REQUIRED )
 include_directories( ${OPENGL_INCLUDE_DIR} )