mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-28 10:36:06 +00:00
added spdlog library
This commit is contained in:
parent
f998469730
commit
72bdf22035
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -7,3 +7,6 @@
|
|||
[submodule "third-party/fmt"]
|
||||
path = third-party/fmt
|
||||
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)
|
||||
|
||||
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>
|
||||
#endif
|
||||
|
||||
#include <fmt/core.h>
|
||||
#include "spdlog/spdlog.h"
|
||||
|
||||
// This example can also compile and run with Emscripten! See 'Makefile.emscripten' for details.
|
||||
#ifdef __EMSCRIPTEN__
|
||||
|
@ -24,7 +24,7 @@
|
|||
// Main code
|
||||
int main(int, char**)
|
||||
{
|
||||
fmt::print("Hello, world!\n");
|
||||
spdlog::info("Welcome to spdlog!");
|
||||
// Setup SDL
|
||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMEPAD) != 0)
|
||||
{
|
||||
|
|
8
third-party/CMakeLists.txt
vendored
8
third-party/CMakeLists.txt
vendored
|
@ -2,6 +2,14 @@
|
|||
set(fmt_DIR ${CMAKE_CURRENT_SOURCE_DIR}/fmt)
|
||||
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 ===================
|
||||
|
||||
set(SDL3_DIR ${CMAKE_CURRENT_SOURCE_DIR}/SDL)
|
||||
|
|
1
third-party/spdlog
vendored
Submodule
1
third-party/spdlog
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit c65aa4e4889939c1afa82001db349cac237a13f8
|
Loading…
Reference in a new issue