added spdlog library
This commit is contained in:
parent
f998469730
commit
72bdf22035
|
@ -7,3 +7,6 @@
|
||||||
[submodule "third-party/fmt"]
|
[submodule "third-party/fmt"]
|
||||||
path = third-party/fmt
|
path = third-party/fmt
|
||||||
url = https://github.com/fmtlib/fmt.git
|
url = https://github.com/fmtlib/fmt.git
|
||||||
|
[submodule "third-party/spdlog"]
|
||||||
|
path = third-party/spdlog
|
||||||
|
url = https://github.com/gabime/spdlog
|
||||||
|
|
|
@ -18,4 +18,4 @@ add_executable(shadps4
|
||||||
|
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
|
|
||||||
target_link_libraries(shadps4 PUBLIC fmt IMGUI SDL3-shared ${OPENGL_LIBRARY})
|
target_link_libraries(shadps4 PUBLIC fmt spdlog IMGUI SDL3-shared ${OPENGL_LIBRARY})
|
|
@ -14,7 +14,7 @@
|
||||||
#include <SDL3/SDL_opengl.h>
|
#include <SDL3/SDL_opengl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <fmt/core.h>
|
#include "spdlog/spdlog.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__
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
// Main code
|
// Main code
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
fmt::print("Hello, world!\n");
|
spdlog::info("Welcome to spdlog!");
|
||||||
// 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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,6 +2,14 @@
|
||||||
set(fmt_DIR ${CMAKE_CURRENT_SOURCE_DIR}/fmt)
|
set(fmt_DIR ${CMAKE_CURRENT_SOURCE_DIR}/fmt)
|
||||||
add_subdirectory(${fmt_DIR})
|
add_subdirectory(${fmt_DIR})
|
||||||
|
|
||||||
|
#=================== SPD ====================
|
||||||
|
set(SPDLOG_WCHAR_FILENAMES ON CACHE BOOL "")
|
||||||
|
set(SPDLOG_NO_THREAD_ID ON CACHE BOOL "")
|
||||||
|
set(SPDLOG_FMT_EXTERNAL ON CACHE BOOL "")
|
||||||
|
add_subdirectory(spdlog EXCLUDE_FROM_ALL)
|
||||||
|
add_library(stb INTERFACE)
|
||||||
|
target_include_directories(stb INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/stb")
|
||||||
|
|
||||||
#=================== SDL3 ===================
|
#=================== SDL3 ===================
|
||||||
|
|
||||||
set(SDL3_DIR ${CMAKE_CURRENT_SOURCE_DIR}/SDL)
|
set(SDL3_DIR ${CMAKE_CURRENT_SOURCE_DIR}/SDL)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit c65aa4e4889939c1afa82001db349cac237a13f8
|
Loading…
Reference in New Issue