aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-03-30 21:52:18 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-03-30 21:52:18 -0700
commite8441676e3c2ef8e65087306457a7e6ec36dc89f (patch)
tree5053b0a31a1c7a11b058ebc708a7d9ca5a31f11a
parenta312cb493959055e13fc5376fff66d46c25c5c59 (diff)
downloadvcpkg-e8441676e3c2ef8e65087306457a7e6ec36dc89f.tar.gz
vcpkg-e8441676e3c2ef8e65087306457a7e6ec36dc89f.zip
[glfw3] Fix position of cmake_minimum_required to come before project directive.
-rw-r--r--ports/glfw3/CONTROL2
-rw-r--r--ports/glfw3/move-cmake-min-req.patch14
-rw-r--r--ports/glfw3/portfile.cmake10
3 files changed, 23 insertions, 3 deletions
diff --git a/ports/glfw3/CONTROL b/ports/glfw3/CONTROL
index 1e8c1ac73..d6493c968 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 000000000..7b5c595df
--- /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 69f496969..4418268d6 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