externals: Add fmt as a submodule

This commit is contained in:
Lioncash 2016-08-25 17:21:19 -04:00 committed by MerryMage
parent ed3a686d1d
commit ee4b30eee4
5 changed files with 18 additions and 0 deletions

3
.gitmodules vendored
View file

@ -1,3 +1,6 @@
[submodule "externals/fmt"]
path = externals/fmt
url = https://github.com/fmtlib/fmt.git
[submodule "externals/xbyak"]
path = externals/xbyak
url = https://github.com/herumi/xbyak

View file

@ -87,6 +87,9 @@ if (DYNARMIC_USE_LLVM)
llvm_map_components_to_libnames(llvm_libs x86desc x86disassembler)
endif()
# Pull in externals CMakeLists for libs where available
add_subdirectory(externals)
# Dynarmic project files
add_subdirectory(src)
add_subdirectory(tests)

6
externals/CMakeLists.txt vendored Normal file
View file

@ -0,0 +1,6 @@
# For libraries that already come with a CMakeLists file,
# simply add the directory to that file as a subdirectory
# to have CMake automatically recognize them.
# fmtlib formatting library
add_subdirectory(fmt)

1
externals/fmt vendored Submodule

@ -0,0 +1 @@
Subproject commit 2ae6bca488795929a0207d109e135751f10c53d9

View file

@ -81,3 +81,8 @@ set_target_properties(dynarmic PROPERTIES LINKER_LANGUAGE CXX)
target_include_directories(dynarmic
PUBLIC ../include
PRIVATE .)
# Link fmt
target_link_libraries(dynarmic PRIVATE fmt-header-only)
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_compile_definitions(dynarmic PRIVATE FMT_USE_WINDOWS_H=0)
endif()