added fmt library

This commit is contained in:
georgemoralis 2023-04-28 12:46:29 +03:00
parent 222d0204db
commit f998469730
5 changed files with 12 additions and 2 deletions

3
.gitmodules vendored
View File

@ -4,3 +4,6 @@
[submodule "third-party/SDL"] [submodule "third-party/SDL"]
path = third-party/SDL path = third-party/SDL
url = https://github.com/libsdl-org/SDL url = https://github.com/libsdl-org/SDL
[submodule "third-party/fmt"]
path = third-party/fmt
url = https://github.com/fmtlib/fmt.git

View File

@ -6,6 +6,7 @@ include_directories(third-party/)
include_directories(third-party/imgui/) include_directories(third-party/imgui/)
include_directories(third-party/imgui/backends) include_directories(third-party/imgui/backends)
include_directories(third-party/sdl/) include_directories(third-party/sdl/)
include_directories(third-party/fmt/include)
add_subdirectory("third-party") add_subdirectory("third-party")
@ -17,4 +18,4 @@ add_executable(shadps4
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
target_link_libraries(shadps4 PUBLIC IMGUI SDL3-shared ${OPENGL_LIBRARY}) target_link_libraries(shadps4 PUBLIC fmt IMGUI SDL3-shared ${OPENGL_LIBRARY})

View File

@ -14,6 +14,8 @@
#include <SDL3/SDL_opengl.h> #include <SDL3/SDL_opengl.h>
#endif #endif
#include <fmt/core.h>
// This example can also compile and run with Emscripten! See 'Makefile.emscripten' for details. // This example can also compile and run with Emscripten! See 'Makefile.emscripten' for details.
#ifdef __EMSCRIPTEN__ #ifdef __EMSCRIPTEN__
#include "../libs/emscripten/emscripten_mainloop_stub.h" #include "../libs/emscripten/emscripten_mainloop_stub.h"
@ -22,6 +24,7 @@
// Main code // Main code
int main(int, char**) int main(int, char**)
{ {
fmt::print("Hello, world!\n");
// Setup SDL // Setup SDL
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMEPAD) != 0) if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMEPAD) != 0)
{ {

View File

@ -1,4 +1,6 @@
#====================FMT ====================
set(fmt_DIR ${CMAKE_CURRENT_SOURCE_DIR}/fmt)
add_subdirectory(${fmt_DIR})
#=================== SDL3 =================== #=================== SDL3 ===================

1
third-party/fmt vendored Submodule

@ -0,0 +1 @@
Subproject commit f8c9fabd948e4b3caea30d3c281018b0308491bf