1
0
mirror of synced 2024-11-12 10:10:53 +01:00

build: Use libfmt as header-only library instead

This commit is contained in:
WerWolv 2021-03-03 23:33:44 +01:00
parent c18cb9f61e
commit 0ad0a91fa4

View File

@ -7,7 +7,6 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/ImGui ${CMAKE_CURREN
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/nlohmann_json ${CMAKE_CURRENT_BINARY_DIR}/external/nlohmann_json)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/nativefiledialog ${CMAKE_CURRENT_BINARY_DIR}/external/nativefiledialog)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../external/fmt ${CMAKE_CURRENT_BINARY_DIR}/external/fmt)
set_property(TARGET fmt PROPERTY CMAKE_POSITION_INDEPENDENT_CODE ON)
set(XDGPP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../external/xdgpp")
if (WIN32)
@ -61,10 +60,10 @@ target_include_directories(libimhex PUBLIC include ${MBEDTLS_INCLUDE_DIR} ${XDGP
target_link_directories(libimhex PUBLIC ${MBEDTLS_LIBRARY_DIR})
if (WIN32)
target_link_libraries(libimhex PUBLIC imgui nlohmann_json libmbedcrypto.a nfd fmt)
target_link_libraries(libimhex PUBLIC imgui nlohmann_json libmbedcrypto.a nfd fmt-header-only)
elseif (APPLE)
find_library(FOUNDATION NAMES Foundation)
target_link_libraries(libimhex PUBLIC imgui nlohmann_json mbedcrypto ${FOUNDATION} nfd fmt)
target_link_libraries(libimhex PUBLIC imgui nlohmann_json mbedcrypto ${FOUNDATION} nfd fmt-header-only)
else()
target_link_libraries(libimhex PUBLIC imgui nlohmann_json mbedcrypto nfd fmt)
target_link_libraries(libimhex PUBLIC imgui nlohmann_json mbedcrypto nfd fmt-header-only)
endif ()