vcpkg/ports/glfw3/fix-config.patch

25 lines
1.0 KiB
Diff
Raw Normal View History

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c0f625..0c985cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -319,7 +319,8 @@ set(GLFW_CONFIG_PATH "${CMAKE_INSTALL_LIBDIR}/cmake/glfw3")
configure_package_config_file(src/glfw3Config.cmake.in
src/glfw3Config.cmake
INSTALL_DESTINATION "${GLFW_CONFIG_PATH}"
- NO_CHECK_REQUIRED_COMPONENTS_MACRO)
+ NO_CHECK_REQUIRED_COMPONENTS_MACRO
+ PATH_VARS CMAKE_INSTALL_INCLUDEDIR)
write_basic_package_version_file(src/glfw3ConfigVersion.cmake
VERSION ${GLFW_VERSION_FULL}
diff --git a/src/glfw3Config.cmake.in b/src/glfw3Config.cmake.in
index 1fa200e..861df93 100644
--- a/src/glfw3Config.cmake.in
+++ b/src/glfw3Config.cmake.in
@@ -1 +1,5 @@
+@PACKAGE_INIT@
+
+set_and_check(glfw_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
+
include("${CMAKE_CURRENT_LIST_DIR}/glfw3Targets.cmake")