* CMakeLists.txt: Don't limit generation of 'pkg-config' file to UNIX. mingw-w64 uses the 'pkg-config' files but does not set UNIX.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 36e1f06..ffb7c48 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -495,41 +495,39 @@ endif ()
if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
# Generate the pkg-config file
- if (UNIX)
- file(READ "${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in" FREETYPE2_PC_IN)
-
- string(REPLACE ";" ", " PKG_CONFIG_REQUIRED_PRIVATE "${PKG_CONFIG_REQUIRED_PRIVATE}")
-
- string(REPLACE "%prefix%" ${CMAKE_INSTALL_PREFIX}
- FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
- string(REPLACE "%exec_prefix%" "\${prefix}"
- FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
- string(REPLACE "%libdir%" "\${prefix}/${CMAKE_INSTALL_LIBDIR}"
- FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
- string(REPLACE "%includedir%" "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}"
- FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
- string(REPLACE "%ft_version%" "${LIBTOOL_CURRENT}.${LIBTOOL_REVISION}.${LIBTOOL_AGE}"
- FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
- string(REPLACE "%REQUIRES_PRIVATE%" "${PKG_CONFIG_REQUIRED_PRIVATE}"
- FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
- string(REPLACE "%LIBS_PRIVATE%" "${PKG_CONFIG_LIBS_PRIVATE}"
- FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
-
- set(FREETYPE2_PC_IN_NAME "${PROJECT_BINARY_DIR}/freetype2.pc")
- if (EXISTS "${FREETYPE2_PC_IN_NAME}")
- file(READ "${FREETYPE2_PC_IN_NAME}" ORIGINAL_FREETYPE2_PC_IN)
- else ()
- set(ORIGINAL_FREETYPE2_PC_IN "")
- endif ()
- if (NOT (ORIGINAL_FREETYPE2_PC_IN STREQUAL FREETYPE2_PC_IN))
- file(WRITE "${FREETYPE2_PC_IN_NAME}" ${FREETYPE2_PC_IN})
- endif ()
-
- install(
- FILES ${PROJECT_BINARY_DIR}/freetype2.pc
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
- COMPONENT pkgconfig)
+ file(READ "${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in" FREETYPE2_PC_IN)
+
+ string(REPLACE ";" ", " PKG_CONFIG_REQUIRED_PRIVATE "${PKG_CONFIG_REQUIRED_PRIVATE}")
+
+ string(REPLACE "%prefix%" ${CMAKE_INSTALL_PREFIX}
+ FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
+ string(REPLACE "%exec_prefix%" "\${prefix}"
+ FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
+ string(REPLACE "%libdir%" "\${prefix}/${CMAKE_INSTALL_LIBDIR}"
+ FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
+ string(REPLACE "%includedir%" "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}"
+ FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
+ string(REPLACE "%ft_version%" "${LIBTOOL_CURRENT}.${LIBTOOL_REVISION}.${LIBTOOL_AGE}"
+ FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
+ string(REPLACE "%REQUIRES_PRIVATE%" "${PKG_CONFIG_REQUIRED_PRIVATE}"
+ FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
+ string(REPLACE "%LIBS_PRIVATE%" "${PKG_CONFIG_LIBS_PRIVATE}"
+ FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
+
+ set(FREETYPE2_PC_IN_NAME "${PROJECT_BINARY_DIR}/freetype2.pc")
+ if (EXISTS "${FREETYPE2_PC_IN_NAME}")
+ file(READ "${FREETYPE2_PC_IN_NAME}" ORIGINAL_FREETYPE2_PC_IN)
+ else ()
+ set(ORIGINAL_FREETYPE2_PC_IN "")
endif ()
+ if (NOT (ORIGINAL_FREETYPE2_PC_IN STREQUAL FREETYPE2_PC_IN))
+ file(WRITE "${FREETYPE2_PC_IN_NAME}" ${FREETYPE2_PC_IN})
+ endif ()
+
+ install(
+ FILES ${PROJECT_BINARY_DIR}/freetype2.pc
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
+ COMPONENT pkgconfig)
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
diff --git a/ChangeLog b/ChangeLog
index 91846fa..1883fda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-03-16 Christopher Degawa <ccom@randomderp.com>
+
+ * CMakeLists.txt: Don't limit generation of 'pkg-config' file to UNIX.
+
+ mingw-w64 uses the 'pkg-config' files but does not set UNIX.
+
2021-03-11 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/smooth/ftgrays.c (gray_set_cell): Refactor to fix VC++ warning.