diff --git a/CMakeLists.txt b/CMakeLists.txt index ad8ded0..32324d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -407,6 +407,7 @@ endif () include(GNUInstallDirs) if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL) + if(UNIX) install( # Note the trailing slash in the argument to `DIRECTORY'! DIRECTORY ${PROJECT_SOURCE_DIR}/include/ @@ -420,6 +421,19 @@ if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL) ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2/freetype/config COMPONENT headers) + else() + install( + # Note the trailing slash in the argument to `DIRECTORY'! + DIRECTORY ${PROJECT_SOURCE_DIR}/include/ + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2 + COMPONENT headers + PATTERN "internal" EXCLUDE + PATTERN "ftoption.h" EXCLUDE) + install( + FILES ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2/freetype/config + COMPONENT headers) + endif() endif () if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)