diff --git a/.gitmodules b/.gitmodules index 55b88933..c354cb32 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "third-party/SDL"] path = third-party/SDL url = https://github.com/libsdl-org/SDL +[submodule "third-party/fmt"] + path = third-party/fmt + url = https://github.com/fmtlib/fmt.git diff --git a/CMakeLists.txt b/CMakeLists.txt index f62a887c..ded597dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,7 @@ include_directories(third-party/) include_directories(third-party/imgui/) include_directories(third-party/imgui/backends) include_directories(third-party/sdl/) +include_directories(third-party/fmt/include) add_subdirectory("third-party") @@ -17,4 +18,4 @@ add_executable(shadps4 find_package(OpenGL REQUIRED) -target_link_libraries(shadps4 PUBLIC IMGUI SDL3-shared ${OPENGL_LIBRARY}) \ No newline at end of file +target_link_libraries(shadps4 PUBLIC fmt IMGUI SDL3-shared ${OPENGL_LIBRARY}) \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 702baeff..612be430 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,6 +14,8 @@ #include #endif +#include + // This example can also compile and run with Emscripten! See 'Makefile.emscripten' for details. #ifdef __EMSCRIPTEN__ #include "../libs/emscripten/emscripten_mainloop_stub.h" @@ -22,6 +24,7 @@ // Main code int main(int, char**) { + fmt::print("Hello, world!\n"); // Setup SDL if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMEPAD) != 0) { diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt index 24f432e6..cd0ec0f0 100644 --- a/third-party/CMakeLists.txt +++ b/third-party/CMakeLists.txt @@ -1,4 +1,6 @@ - +#====================FMT ==================== +set(fmt_DIR ${CMAKE_CURRENT_SOURCE_DIR}/fmt) +add_subdirectory(${fmt_DIR}) #=================== SDL3 =================== diff --git a/third-party/fmt b/third-party/fmt new file mode 160000 index 00000000..f8c9fabd --- /dev/null +++ b/third-party/fmt @@ -0,0 +1 @@ +Subproject commit f8c9fabd948e4b3caea30d3c281018b0308491bf