* CMakeLists.txt: Always create `ftconfig.h'. For non-UNIX builds, the file stays unmodified. However, it's better to have the main configuration files at the same place regardless of the OS.
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
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f1f4108..7d22293 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -156,14 +156,14 @@ file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/include/freetype/config")
# Create the configuration file
+message(STATUS
+ "Creating file ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h")
+
if (UNIX)
check_include_file("unistd.h" HAVE_UNISTD_H)
check_include_file("fcntl.h" HAVE_FCNTL_H)
check_include_file("stdint.h" HAVE_STDINT_H)
- message(STATUS
- "Creating file ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h")
-
file(READ "${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.in"
FTCONFIG_H)
if (HAVE_UNISTD_H)
@@ -185,6 +185,11 @@ if (UNIX)
FTCONFIG_H "${FTCONFIG_H}")
file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h"
"${FTCONFIG_H}")
+else ()
+ file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftconfig.h"
+ FTCONFIG_H)
+ file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h"
+ "${FTCONFIG_H}")
endif ()
@@ -341,8 +346,11 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/
DESTINATION include/freetype2
PATTERN "internal" EXCLUDE
PATTERN "ftconfig.h" EXCLUDE
+ PATTERN "ftoption.h" EXCLUDE
)
-install(FILES ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h
+install(FILES
+ ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h
+ ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h
DESTINATION include/freetype2/freetype/config
)
install(TARGETS freetype
diff --git a/ChangeLog b/ChangeLog
index 320b9c8..a20be8f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2015-06-28 Werner Lemberg <wl@gnu.org>
+ * CMakeLists.txt: Always create `ftconfig.h'.
+
+ For non-UNIX builds, the file stays unmodified. However, it's
+ better to have the main configuration files at the same place
+ regardless of the OS.
+
+2015-06-28 Werner Lemberg <wl@gnu.org>
+
* CMakeLists.txt: Improve MSVC support (#43737).
2015-06-28 Werner Lemberg <wl@gnu.org>