mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
[glfw3] Fix position of cmake_minimum_required to come before project directive.
This commit is contained in:
parent
a312cb4939
commit
e8441676e3
@ -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.
|
14
ports/glfw3/move-cmake-min-req.patch
Normal file
14
ports/glfw3/move-cmake-min-req.patch
Normal file
@ -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,
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user