mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-14 23:55:45 -04:00
dep: Add fmt 9.0.0
This commit is contained in:
7
dep/fmt/support/cmake/FindSetEnv.cmake
Normal file
7
dep/fmt/support/cmake/FindSetEnv.cmake
Normal file
@ -0,0 +1,7 @@
|
||||
# A CMake script to find SetEnv.cmd.
|
||||
|
||||
find_program(WINSDK_SETENV NAMES SetEnv.cmd
|
||||
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]/bin")
|
||||
if (WINSDK_SETENV AND PRINT_PATH)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${WINSDK_SETENV}")
|
||||
endif ()
|
26
dep/fmt/support/cmake/JoinPaths.cmake
Normal file
26
dep/fmt/support/cmake/JoinPaths.cmake
Normal file
@ -0,0 +1,26 @@
|
||||
# This module provides function for joining paths
|
||||
# known from from most languages
|
||||
#
|
||||
# Original license:
|
||||
# SPDX-License-Identifier: (MIT OR CC0-1.0)
|
||||
# Explicit permission given to distribute this module under
|
||||
# the terms of the project as described in /LICENSE.rst.
|
||||
# Copyright 2020 Jan Tojnar
|
||||
# https://github.com/jtojnar/cmake-snips
|
||||
#
|
||||
# Modelled after Python’s os.path.join
|
||||
# https://docs.python.org/3.7/library/os.path.html#os.path.join
|
||||
# Windows not supported
|
||||
function(join_paths joined_path first_path_segment)
|
||||
set(temp_path "${first_path_segment}")
|
||||
foreach(current_segment IN LISTS ARGN)
|
||||
if(NOT ("${current_segment}" STREQUAL ""))
|
||||
if(IS_ABSOLUTE "${current_segment}")
|
||||
set(temp_path "${current_segment}")
|
||||
else()
|
||||
set(temp_path "${temp_path}/${current_segment}")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
set(${joined_path} "${temp_path}" PARENT_SCOPE)
|
||||
endfunction()
|
54
dep/fmt/support/cmake/cxx14.cmake
Normal file
54
dep/fmt/support/cmake/cxx14.cmake
Normal file
@ -0,0 +1,54 @@
|
||||
# C++14 feature support detection
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
function (fmt_check_cxx_compiler_flag flag result)
|
||||
if (NOT MSVC)
|
||||
check_cxx_compiler_flag("${flag}" ${result})
|
||||
endif ()
|
||||
endfunction ()
|
||||
|
||||
if (NOT CMAKE_CXX_STANDARD)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
endif()
|
||||
message(STATUS "CXX_STANDARD: ${CMAKE_CXX_STANDARD}")
|
||||
|
||||
if (CMAKE_CXX_STANDARD EQUAL 20)
|
||||
fmt_check_cxx_compiler_flag(-std=c++20 has_std_20_flag)
|
||||
fmt_check_cxx_compiler_flag(-std=c++2a has_std_2a_flag)
|
||||
|
||||
if (has_std_20_flag)
|
||||
set(CXX_STANDARD_FLAG -std=c++20)
|
||||
elseif (has_std_2a_flag)
|
||||
set(CXX_STANDARD_FLAG -std=c++2a)
|
||||
endif ()
|
||||
|
||||
elseif (CMAKE_CXX_STANDARD EQUAL 17)
|
||||
fmt_check_cxx_compiler_flag(-std=c++17 has_std_17_flag)
|
||||
fmt_check_cxx_compiler_flag(-std=c++1z has_std_1z_flag)
|
||||
|
||||
if (has_std_17_flag)
|
||||
set(CXX_STANDARD_FLAG -std=c++17)
|
||||
elseif (has_std_1z_flag)
|
||||
set(CXX_STANDARD_FLAG -std=c++1z)
|
||||
endif ()
|
||||
|
||||
elseif (CMAKE_CXX_STANDARD EQUAL 14)
|
||||
fmt_check_cxx_compiler_flag(-std=c++14 has_std_14_flag)
|
||||
fmt_check_cxx_compiler_flag(-std=c++1y has_std_1y_flag)
|
||||
|
||||
if (has_std_14_flag)
|
||||
set(CXX_STANDARD_FLAG -std=c++14)
|
||||
elseif (has_std_1y_flag)
|
||||
set(CXX_STANDARD_FLAG -std=c++1y)
|
||||
endif ()
|
||||
|
||||
elseif (CMAKE_CXX_STANDARD EQUAL 11)
|
||||
fmt_check_cxx_compiler_flag(-std=c++11 has_std_11_flag)
|
||||
fmt_check_cxx_compiler_flag(-std=c++0x has_std_0x_flag)
|
||||
|
||||
if (has_std_11_flag)
|
||||
set(CXX_STANDARD_FLAG -std=c++11)
|
||||
elseif (has_std_0x_flag)
|
||||
set(CXX_STANDARD_FLAG -std=c++0x)
|
||||
endif ()
|
||||
endif ()
|
7
dep/fmt/support/cmake/fmt-config.cmake.in
Normal file
7
dep/fmt/support/cmake/fmt-config.cmake.in
Normal file
@ -0,0 +1,7 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
if (NOT TARGET fmt::fmt)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake)
|
||||
endif ()
|
||||
|
||||
check_required_components(fmt)
|
11
dep/fmt/support/cmake/fmt.pc.in
Normal file
11
dep/fmt/support/cmake/fmt.pc.in
Normal file
@ -0,0 +1,11 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=@CMAKE_INSTALL_PREFIX@
|
||||
libdir=@libdir_for_pc_file@
|
||||
includedir=@includedir_for_pc_file@
|
||||
|
||||
Name: fmt
|
||||
Description: A modern formatting library
|
||||
Version: @FMT_VERSION@
|
||||
Libs: -L${libdir} -l@FMT_LIB_NAME@
|
||||
Cflags: -I${includedir}
|
||||
|
Reference in New Issue
Block a user