From aa486ed7114cd2f83cfcc653d4e0898b05348b9c Mon Sep 17 00:00:00 2001 From: ryouze <98982999+ryouze@users.noreply.github.com> Date: Sun, 10 Nov 2024 23:59:11 +0100 Subject: [PATCH] Download fmt as zip file, use gnu install dirs. --- CMakeLists.txt | 1 + cmake/External.cmake | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b5048f..95e4acd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,6 +107,7 @@ add_executable(${PROJECT_NAME} src/main.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE ${PROJECT_NAME}-lib) # Add install target +include(GNUInstallDirs) install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) # Add tests if enabled diff --git a/cmake/External.cmake b/cmake/External.cmake index 4c104d2..ac87657 100644 --- a/cmake/External.cmake +++ b/cmake/External.cmake @@ -12,10 +12,8 @@ function(fetch_and_link_external_dependencies target) # SYSTEM is used to prevent applying compile flags to the dependencies FetchContent_Declare( fmt - GIT_REPOSITORY https://github.com/fmtlib/fmt.git - GIT_TAG 11.0.2 - GIT_PROGRESS TRUE - GIT_SHALLOW TRUE + URL https://github.com/fmtlib/fmt/releases/download/11.0.2/fmt-11.0.2.zip + DOWNLOAD_EXTRACT_TIMESTAMP TRUE EXCLUDE_FROM_ALL SYSTEM )