From fd6392db03990d5d739eeeb577e3274d2496defa Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Sun, 25 Apr 2021 12:18:05 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=203rdParty/libfmt/CMakeLists.txt:?= =?UTF-8?q?=20Fix=20line=20endings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 3rdParty/libfmt/CMakeLists.txt | 46 +++++++++++++++++----------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/3rdParty/libfmt/CMakeLists.txt b/3rdParty/libfmt/CMakeLists.txt index 8caeaed0a..751ddc6fd 100644 --- a/3rdParty/libfmt/CMakeLists.txt +++ b/3rdParty/libfmt/CMakeLists.txt @@ -1,23 +1,23 @@ -include(FetchContent_MakeAvailableExcludeFromAll) - -if(NOT WIN32 AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD) - # Enable POSIX extensions such as `readlink` and `ftruncate`. - add_definitions(-D_POSIX_C_SOURCE=200809L) - # Defining _POSIX_C_SOURCE should be enough for the compiler not to define __STRICT_ANSI__ - # but some still do, so we also have to explicitly undefine it. - add_compile_options(-U__STRICT_ANSI__) -endif() - -if(DEVILUTIONX_STATIC_LIBFMT) - set(BUILD_SHARED_LIBS OFF) -else() - set(BUILD_SHARED_LIBS ON) -endif() -include(FetchContent) -FetchContent_Declare(fmt - URL https://github.com/fmtlib/fmt/archive/7bdf0628b1276379886c7f6dda2cef2b3b374f0b.zip - URL_HASH MD5=70e0a0beda4bdac7debe60d380e1d802 -) -FetchContent_MakeAvailableExcludeFromAll(fmt) - -set(fmt_INCLUDE_DIR ${fmt_SOURCE_DIR} PARENT_SCOPE) +include(FetchContent_MakeAvailableExcludeFromAll) + +if(NOT WIN32 AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD) + # Enable POSIX extensions such as `readlink` and `ftruncate`. + add_definitions(-D_POSIX_C_SOURCE=200809L) + # Defining _POSIX_C_SOURCE should be enough for the compiler not to define __STRICT_ANSI__ + # but some still do, so we also have to explicitly undefine it. + add_compile_options(-U__STRICT_ANSI__) +endif() + +if(DEVILUTIONX_STATIC_LIBFMT) + set(BUILD_SHARED_LIBS OFF) +else() + set(BUILD_SHARED_LIBS ON) +endif() +include(FetchContent) +FetchContent_Declare(fmt + URL https://github.com/fmtlib/fmt/archive/7bdf0628b1276379886c7f6dda2cef2b3b374f0b.zip + URL_HASH MD5=70e0a0beda4bdac7debe60d380e1d802 +) +FetchContent_MakeAvailableExcludeFromAll(fmt) + +set(fmt_INCLUDE_DIR ${fmt_SOURCE_DIR} PARENT_SCOPE)