--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -954,6 +954,9 @@
 endif()
 
 target_include_directories(partio_zip_lib PUBLIC external/partio_zip/)
+target_link_libraries(supertux2_lib PUBLIC SDL_ttf_lib)
+target_link_libraries(supertux2_lib PUBLIC tinygettext_lib)
+target_link_libraries(supertux2_lib PUBLIC savepng)
 
 if (NOT EMSCRIPTEN)
   target_include_directories(supertux2_lib SYSTEM PUBLIC ${SDL2_INCLUDE_DIRS})
@@ -966,7 +969,6 @@
   endif()
 endif()
 target_include_directories(supertux2_lib SYSTEM PUBLIC ${SDL_TTF_PREFIX}/include/SDL2)
-target_link_libraries(supertux2_lib PUBLIC SDL_ttf_lib)
 if(VCPKG_BUILD)
   target_link_libraries(supertux2_lib PUBLIC freetype)
 else()
@@ -979,9 +981,7 @@
 
 target_link_libraries(supertux2_lib PUBLIC squirrel_lib)
 target_link_libraries(supertux2_lib PUBLIC sqstdlib_lib)
-target_link_libraries(supertux2_lib PUBLIC tinygettext_lib)
 target_link_libraries(supertux2_lib PUBLIC sexp)
-target_link_libraries(supertux2_lib PUBLIC savepng)
 target_link_libraries(supertux2_lib PUBLIC partio_zip_lib)
 if(ENABLE_DISCORD)
 target_link_libraries(supertux2_lib PUBLIC discord-rpc)
