aboutsummaryrefslogtreecommitdiff
path: root/ports/glew
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-09-18 20:50:08 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2016-09-18 20:54:03 -0700
commitccca198c1b1730b0241911cb56dc8e3504958b2a (patch)
treea2dd9b8b087a09afdcecc5cbb3377bed15127eb2 /ports/glew
downloadvcpkg-ccca198c1b1730b0241911cb56dc8e3504958b2a.tar.gz
vcpkg-ccca198c1b1730b0241911cb56dc8e3504958b2a.zip
Initial commit
Diffstat (limited to 'ports/glew')
-rw-r--r--ports/glew/CONTROL3
-rw-r--r--ports/glew/portfile.cmake53
2 files changed, 56 insertions, 0 deletions
diff --git a/ports/glew/CONTROL b/ports/glew/CONTROL
new file mode 100644
index 000000000..f38f2dc40
--- /dev/null
+++ b/ports/glew/CONTROL
@@ -0,0 +1,3 @@
+Source: glew
+Version: 1.13.0
+Description: The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library. \ No newline at end of file
diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake
new file mode 100644
index 000000000..320db8043
--- /dev/null
+++ b/ports/glew/portfile.cmake
@@ -0,0 +1,53 @@
+include(vcpkg_common_functions)
+vcpkg_download_distfile(ARCHIVE_FILE
+ URL "http://downloads.sourceforge.net/project/glew/glew/1.13.0/glew-1.13.0.tgz"
+ FILENAME "glew-1.13.0.tgz"
+ MD5 7cbada3166d2aadfc4169c4283701066
+)
+vcpkg_extract_source_archive(${ARCHIVE_FILE})
+
+if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/build/vc12/glew_shared14.vcxproj)
+ message(STATUS "Upgrading projects")
+ file(READ ${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/build/vc12/glew_shared.vcxproj PROJ)
+ string(REPLACE
+ "<PlatformToolset>v120</PlatformToolset>"
+ "<PlatformToolset>v140</PlatformToolset>"
+ PROJ ${PROJ})
+ string(REPLACE
+ "opengl32.lib%"
+ "opengl32.lib\;%"
+ PROJ ${PROJ})
+ file(WRITE ${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/build/vc12/glew_shared14.vcxproj ${PROJ})
+endif()
+message(STATUS "Upgrading projects done")
+
+vcpkg_build_msbuild(
+ PROJECT_PATH ${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/build/vc12/glew_shared14.vcxproj
+)
+
+message(STATUS "Installing")
+file(INSTALL
+ ${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/bin/Debug/Win32/glew32d.dll
+ ${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/bin/Debug/Win32/glew32d.pdb
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
+)
+file(INSTALL
+ ${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/bin/Release/Win32/glew32.dll
+ ${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/bin/Release/Win32/glew32.pdb
+ DESTINATION ${CURRENT_PACKAGES_DIR}/bin
+)
+file(INSTALL
+ ${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/lib/Debug/Win32/glew32d.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
+)
+file(INSTALL
+ ${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/lib/Release/Win32/glew32.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/lib
+)
+file(INSTALL
+ ${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/include/GL
+ DESTINATION ${CURRENT_PACKAGES_DIR}/include
+)
+file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/glew-1.13.0/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glew RENAME copyright)
+vcpkg_copy_pdbs()
+message(STATUS "Installing done")