remove SDL2_ttf dependency
This commit is contained in:
		@@ -5,7 +5,6 @@ project(townengine LANGUAGES C)
 | 
			
		||||
# SDL dependencies
 | 
			
		||||
find_package(SDL2 REQUIRED GLOBAL)
 | 
			
		||||
find_package(SDL2_image REQUIRED GLOBAL)
 | 
			
		||||
find_package(SDL2_ttf REQUIRED GLOBAL)
 | 
			
		||||
 | 
			
		||||
# CMake actually has no default configuration and it's toolchain file dependent, set debug if not specified
 | 
			
		||||
if(NOT CMAKE_BUILD_TYPE)
 | 
			
		||||
@@ -196,7 +195,6 @@ function(link_deps target)
 | 
			
		||||
        target_link_libraries(${target} PUBLIC
 | 
			
		||||
                                        SDL2::SDL2
 | 
			
		||||
                                        SDL2_image::SDL2_image
 | 
			
		||||
                                        SDL2_ttf::SDL2_ttf
 | 
			
		||||
                                        physfs-static
 | 
			
		||||
                                        xms)
 | 
			
		||||
endfunction()
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,6 @@
 | 
			
		||||
#include "townengine/rendering/internal_api.h"
 | 
			
		||||
 | 
			
		||||
#include <SDL2/SDL.h>
 | 
			
		||||
#include <SDL2/SDL_ttf.h>
 | 
			
		||||
#include <SDL2/SDL_image.h>
 | 
			
		||||
#include <physfs.h>
 | 
			
		||||
#include <stb_ds.h>
 | 
			
		||||
@@ -336,10 +335,6 @@ static bool initialize(void) {
 | 
			
		||||
    ctx.uncolored_mesh_batches = NULL;
 | 
			
		||||
 | 
			
		||||
    textures_cache_init(&ctx.texture_cache, ctx.window);
 | 
			
		||||
    if (TTF_Init() < 0) {
 | 
			
		||||
        CRY_SDL("SDL_ttf initialization failed.");
 | 
			
		||||
        goto fail;
 | 
			
		||||
    }
 | 
			
		||||
    text_cache_init(&ctx.text_cache);
 | 
			
		||||
 | 
			
		||||
    /* input */
 | 
			
		||||
@@ -380,7 +375,6 @@ static void clean_up(void) {
 | 
			
		||||
    textures_cache_deinit(&ctx.texture_cache);
 | 
			
		||||
 | 
			
		||||
    PHYSFS_deinit();
 | 
			
		||||
    TTF_Quit();
 | 
			
		||||
    IMG_Quit();
 | 
			
		||||
    SDL_Quit();
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user