Freetype added to the project (need to test in linux)

Gui_Panel_Refactor
Joeyrp 4 years ago
parent 78e15c546e
commit 6afa6d8505

3
.gitmodules vendored

@ -10,3 +10,6 @@
[submodule "external/pugixml"]
path = external/pugixml
url = https://github.com/zeux/pugixml.git
[submodule "external/freetype"]
path = external/freetype
url = https://gitlab.freedesktop.org/freetype/freetype.git

@ -69,6 +69,10 @@ if(NOT EXISTS "${PROJECT_SOURCE_DIR}/external/pugixml/CMakeLists.txt")
message(FATAL_ERROR "The submodules were not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules and try again.")
endif()
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/external/freetype/CMakeLists.txt")
message(FATAL_ERROR "The submodules were not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules and try again.")
endif()
# add GLFW
add_subdirectory(external/glfw)
@ -87,6 +91,9 @@ add_subdirectory(external/lua)
# add pugixml
add_subdirectory(external/pugixml)
# add freetype
add_subdirectory(external/freetype)
target_include_directories(${PROJECT_NAME}
PUBLIC "${PROJECT_BINARY_DIR}"
PUBLIC src
@ -96,6 +103,7 @@ target_include_directories(${PROJECT_NAME}
PUBLIC src/dearimgui
PUBLIC external/pugixml/src
PUBLIC external/glad/include
PUBLIC external/freetype/include
)
target_link_directories(${PROJECT_NAME}
@ -103,10 +111,11 @@ target_link_directories(${PROJECT_NAME}
PRIVATE external/glm
PRIVATE src/dearimgui
PRIVATE external/glad/src
PRIVATE external/freetype/src
)
if(WIN32)
target_link_libraries(${PROJECT_NAME} opengl32.lib glfw glad glm dearimgui lua_static pugixml)
target_link_libraries(${PROJECT_NAME} opengl32.lib glfw glad glm dearimgui lua_static pugixml freetype)
elseif(UNIX)
target_link_libraries(${PROJECT_NAME} X11 GL glfw glad glm dearimgui lua_static pugixml)
target_link_libraries(${PROJECT_NAME} X11 GL glfw glad glm dearimgui lua_static pugixml freetype)
endif()

@ -5,7 +5,9 @@ Core:
Graphics:
☐ Dear ImGui class with basic initialization
☐ Decide on a font/text rendering system
✔ Decide on a font/text rendering system @done (9/7/2021, 1:39:53 PM)
✔ Add FreeType to the project @done (9/7/2021, 2:23:13 PM)
☐ Add a new class for font loading/management and text rendering
Input:
☐ Port over the Element2D input system and adust it to use glfw
☐ Port over the Element2D input system and adjust it to use glfw

1
external/freetype vendored

@ -0,0 +1 @@
Subproject commit 60a93ea2318f6626ae72933ef9a44e60da170325

@ -12,8 +12,23 @@
#include <iostream>
#include <filesystem>
// TESTING
// #include <ft2build.h>
// #include FT_FREETYPE_H
int main(int argc, char** argv)
{
// TESTING -- FREETYPE
// FT_Library ft;
// if (FT_Init_FreeType(&ft))
// {
// std::cout << "Could not init FreeType Library\n";
// return -1;
// }
// std::cout << "Freetype library sucessfully initialized!\n";
////////////////
// Switch the currrent working directory to the directory
// containing the lunarium.exe file because the data and state
// file should be in that location

Loading…
Cancel
Save