Skip to content

Commit

Permalink
[freeglut] Don't enforce x64 when the compiler is 64 bit (#16911)
Browse files Browse the repository at this point in the history
* [freeglut] Don't enforce x64 when the compiler is 64 bit

This fixes compilation for ARM64.

* [freeglut] Update manifest

* Update ports/freeglut/CONTROL

* Update versions/f-/freeglut.json

* Update versions/baseline.json

* Update versions/baseline.json

* Update versions/f-/freeglut.json

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
  • Loading branch information
davidebeatrici and JackBoosY committed Apr 9, 2021
1 parent 9ec6217 commit c91bcb1
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ports/freeglut/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Source: freeglut
Version: 3.2.1-4
Version: 3.2.1
Port-Version: 5
Homepage: https://sourceforge.net/projects/freeglut/
Description: Open source implementation of GLUT with source and binary backwards compatibility.
17 changes: 17 additions & 0 deletions ports/freeglut/no_x64_enforcement.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/CMakeLists.txt.orig b/CMakeLists.txt
index 6f403af..d1ba4e7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -418,12 +418,6 @@ IF(WIN32)
IF(FREEGLUT_REPLACE_GLUT)
SET_TARGET_PROPERTIES(freeglut_static PROPERTIES OUTPUT_NAME ${LIBNAME})
ENDIF()
- # need to set machine:x64 for linker, at least for VC10, and
- # doesn't hurt for older compilers:
- # http://public.kitware.com/Bug/view.php?id=11240#c22768
- IF (CMAKE_CL_64)
- SET_TARGET_PROPERTIES(freeglut_static PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64")
- ENDIF()
ENDIF()
ELSE()
# on UNIX we need to make sure:
1 change: 1 addition & 0 deletions ports/freeglut/portfile.cmake
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ vcpkg_from_sourceforge(
macOS_Xquartz.patch
gcc10.patch
fix-debug-macro.patch
no_x64_enforcement.patch
)

if(NOT VCPKG_TARGET_IS_WINDOWS)
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2049,8 +2049,8 @@
"port-version": 0
},
"freeglut": {
"baseline": "3.2.1-4",
"port-version": 0
"baseline": "3.2.1",
"port-version": 5
},
"freeimage": {
"baseline": "3.18.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/f-/freeglut.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "bfc1c37b44246e2a3c8bfead99af1d14a2103453",
"version-string": "3.2.1",
"port-version": 5
},
{
"git-tree": "e74a294251de6c8168d8c7015a497a9a0dd91185",
"version-string": "3.2.1-4",
Expand Down

0 comments on commit c91bcb1

Please sign in to comment.