Skip to content

Commit ff7c0fe

Browse files
committed
#2397: cmake: add in missing cmake for install
1 parent 284b5ce commit ff7c0fe

File tree

5 files changed

+55
-4
lines changed

5 files changed

+55
-4
lines changed

lib/fmt/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,10 @@ if (FMT_INSTALL)
370370
# "${PROJECT_SOURCE_DIR}/support/cmake/fmt.pc.in"
371371
# "${pkgconfig}"
372372
# @ONLY)
373-
# configure_package_config_file(
374-
# ${PROJECT_SOURCE_DIR}/support/cmake/fmt-config.cmake.in
375-
# ${project_config}
376-
# INSTALL_DESTINATION ${FMT_CMAKE_DIR})
373+
configure_package_config_file(
374+
${PROJECT_SOURCE_DIR}/support/cmake/fmt-config.cmake.in
375+
${project_config}
376+
INSTALL_DESTINATION ${FMT_CMAKE_DIR})
377377

378378
set(INSTALL_TARGETS fmt fmt-header-only)
379379

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# A CMake script to find SetEnv.cmd.
2+
3+
find_program(WINSDK_SETENV NAMES SetEnv.cmd
4+
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]/bin")
5+
if (WINSDK_SETENV AND PRINT_PATH)
6+
execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${WINSDK_SETENV}")
7+
endif ()
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This module provides function for joining paths
2+
# known from from most languages
3+
#
4+
# Original license:
5+
# SPDX-License-Identifier: (MIT OR CC0-1.0)
6+
# Explicit permission given to distribute this module under
7+
# the terms of the project as described in /LICENSE.rst.
8+
# Copyright 2020 Jan Tojnar
9+
# https://github.com/jtojnar/cmake-snips
10+
#
11+
# Modelled after Python’s os.path.join
12+
# https://docs.python.org/3.7/library/os.path.html#os.path.join
13+
# Windows not supported
14+
function(join_paths joined_path first_path_segment)
15+
set(temp_path "${first_path_segment}")
16+
foreach(current_segment IN LISTS ARGN)
17+
if(NOT ("${current_segment}" STREQUAL ""))
18+
if(IS_ABSOLUTE "${current_segment}")
19+
set(temp_path "${current_segment}")
20+
else()
21+
set(temp_path "${temp_path}/${current_segment}")
22+
endif()
23+
endif()
24+
endforeach()
25+
set(${joined_path} "${temp_path}" PARENT_SCOPE)
26+
endfunction()
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@PACKAGE_INIT@
2+
3+
if (NOT TARGET fmt::fmt)
4+
include(${CMAKE_CURRENT_LIST_DIR}/@[email protected])
5+
endif ()
6+
7+
check_required_components(fmt)

lib/fmt/support/cmake/fmt.pc.in

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
prefix=@CMAKE_INSTALL_PREFIX@
2+
exec_prefix=@CMAKE_INSTALL_PREFIX@
3+
libdir=@libdir_for_pc_file@
4+
includedir=@includedir_for_pc_file@
5+
6+
Name: fmt
7+
Description: A modern formatting library
8+
Version: @FMT_VERSION@
9+
Libs: -L${libdir} -l@FMT_LIB_NAME@
10+
Cflags: -I${includedir}
11+

0 commit comments

Comments
 (0)