diff --git a/ports/glfw3/CONTROL b/ports/glfw3/CONTROL index 1e8c1ac73d..d6493c9686 100644 --- a/ports/glfw3/CONTROL +++ b/ports/glfw3/CONTROL @@ -1,3 +1,3 @@ Source: glfw3 -Version: 3.2.1 +Version: 3.2.1-1 Description: GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platform-independent API for creating windows, contexts and surfaces, reading input, handling events, etc. \ No newline at end of file diff --git a/ports/glfw3/move-cmake-min-req.patch b/ports/glfw3/move-cmake-min-req.patch new file mode 100644 index 0000000000..7b5c595df8 --- /dev/null +++ b/ports/glfw3/move-cmake-min-req.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b1476bd..00fc0b9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,8 +1,8 @@ + set(CMAKE_LEGACY_CYGWIN_WIN32 OFF) + ++cmake_minimum_required(VERSION 2.8.12) + project(GLFW C) + +-cmake_minimum_required(VERSION 2.8.12) + + if (NOT CMAKE_VERSION VERSION_LESS "3.0") + # Until all major package systems have moved to CMake 3, diff --git a/ports/glfw3/portfile.cmake b/ports/glfw3/portfile.cmake index 69f496969d..4418268d62 100644 --- a/ports/glfw3/portfile.cmake +++ b/ports/glfw3/portfile.cmake @@ -7,7 +7,8 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/patch.stamp) +if(NOT EXISTS ${SOURCE_PATH}/patch-config.stamp) + message(STATUS "Patching src/glfw3Config.cmake.in") file(READ ${SOURCE_PATH}/src/glfw3Config.cmake.in CONFIG) string(REPLACE "\"@GLFW_LIB_NAME@\"" "NAMES @GLFW_LIB_NAME@ @GLFW_LIB_NAME@dll" CONFIG ${CONFIG} @@ -17,9 +18,14 @@ if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/patch.stamp) #) file(WRITE ${SOURCE_PATH}/src/glfw3Config.cmake.in ${CONFIG}) file(APPEND ${SOURCE_PATH}/src/glfw3Config.cmake.in "set(GLFW3_LIBRARIES \${GLFW3_LIBRARY})\n") - file(WRITE ${CURRENT_BUILDTREES_DIR}/patch.stamp) + file(WRITE ${SOURCE_PATH}/patch-config.stamp) endif() +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/move-cmake-min-req.patch +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS