aboutsummaryrefslogtreecommitdiff
path: root/ports/glbinding
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2016-10-18 15:19:11 -0700
committerGitHub <noreply@github.com>2016-10-18 15:19:11 -0700
commitc41200cf6ec32b276f0dcdce74bed929a7c57622 (patch)
treeb5b00e6f5bbda884dcd9f1e9511ebf05b3b21845 /ports/glbinding
parent8fd12fed6cbe6ea563eb709b34a86967d562c78e (diff)
parenteba9f6a812edb48f14b5ad931d4f909e48f5b70d (diff)
downloadvcpkg-c41200cf6ec32b276f0dcdce74bed929a7c57622.tar.gz
vcpkg-c41200cf6ec32b276f0dcdce74bed929a7c57622.zip
Merge pull request #177 from barcharcraz/glbinding-static
added static support to glbinding
Diffstat (limited to 'ports/glbinding')
-rw-r--r--ports/glbinding/portfile.cmake23
1 files changed, 8 insertions, 15 deletions
diff --git a/ports/glbinding/portfile.cmake b/ports/glbinding/portfile.cmake
index 5b928445f..ada070089 100644
--- a/ports/glbinding/portfile.cmake
+++ b/ports/glbinding/portfile.cmake
@@ -8,9 +8,6 @@
include(${CMAKE_TRIPLET_FILE})
include(vcpkg_common_functions)
-if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
- message(FATAL_ERROR "Portfile not yet modified for building glbinding statically")
-endif()
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/cginternals/glbinding/archive/v2.1.1.zip"
@@ -18,14 +15,7 @@ vcpkg_download_distfile(ARCHIVE
SHA512 66b21853a4f4760b7b22cafd5211958769c513e83be999018fe79cf56a9271e0e28566caaa2286393f54ac2154d564a68d12159598d03c965adf6756f3753f11
)
vcpkg_extract_source_archive(${ARCHIVE})
-
-vcpkg_configure_cmake(
- SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glbinding-2.1.1
- # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
- # OPTIONS_RELEASE -DOPTIMIZE=1
- # OPTIONS_DEBUG -DDEBUGGABLE=1
-)
-
+vcpkg_configure_cmake(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glbinding-2.1.1)
vcpkg_build_cmake()
vcpkg_install_cmake()
@@ -39,10 +29,13 @@ file(READ ${CURRENT_PACKAGES_DIR}/debug/cmake/glbinding/glbinding-export-debug.c
string(REPLACE "\${IMPORT_PREFIX}" "\${IMPORT_PREFIX}/debug" GLBINDING_DEBUG_MODULE "${GLBINDING_DEBUG_MODULE}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/glbinding/glbinding-export-debug.cmake "${GLBINDING_DEBUG_MODULE}")
file(RENAME ${CURRENT_PACKAGES_DIR}/glbinding-config.cmake ${CURRENT_PACKAGES_DIR}/share/glbinding/glbinding-config.cmake)
-file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
-file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
-file(RENAME ${CURRENT_PACKAGES_DIR}/glbinding.dll ${CURRENT_PACKAGES_DIR}/bin/glbinding.dll)
-file(RENAME ${CURRENT_PACKAGES_DIR}/debug/glbindingd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/glbindingd.dll)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/glbinding-config.cmake)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/glbinding.dll ${CURRENT_PACKAGES_DIR}/bin/glbinding.dll)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/glbindingd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/glbindingd.dll)
+endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake)
file(RENAME ${CURRENT_PACKAGES_DIR}/data ${CURRENT_PACKAGES_DIR}/share/data)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/data)