diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2016-10-31 18:21:57 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2016-10-31 18:21:57 -0700 |
| commit | 33334e830819b185cdf207abec6ee32601b78c90 (patch) | |
| tree | 7637a54951c252e6f41d185e6bc580662627ef77 | |
| parent | 789855546ca26ae30398235d0b3ee2f9eb92c40a (diff) | |
| download | vcpkg-33334e830819b185cdf207abec6ee32601b78c90.tar.gz vcpkg-33334e830819b185cdf207abec6ee32601b78c90.zip | |
[glfw3] Enable static building
| -rw-r--r-- | ports/glfw3/portfile.cmake | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/ports/glfw3/portfile.cmake b/ports/glfw3/portfile.cmake index f2aa28e04..b947142d8 100644 --- a/ports/glfw3/portfile.cmake +++ b/ports/glfw3/portfile.cmake @@ -1,7 +1,4 @@ include(${CMAKE_TRIPLET_FILE}) -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Static building not supported yet") -endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glfw-3.2.1) vcpkg_download_distfile(ARCHIVE @@ -27,25 +24,15 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS - -DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DPACKAGE_CMAKE_INSTALL_PREFIX=\${CMAKE_CURRENT_LIST_DIR}/../.. - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() -file(MAKE_DIRECTORY - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/debug/bin - ${CURRENT_PACKAGES_DIR}/share -) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/glfw3.dll ${CURRENT_PACKAGES_DIR}/bin/glfw3.dll) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/glfw3.dll ${CURRENT_PACKAGES_DIR}/debug/bin/glfw3.dll) - +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/glfw3 ${CURRENT_PACKAGES_DIR}/share/glfw3) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/glfw3/glfw3Targets-debug.cmake ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets-debug.cmake) @@ -53,8 +40,11 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/glfw3.lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/glfw3.lib) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/glfw3.dll ${CURRENT_PACKAGES_DIR}/bin/glfw3.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/glfw3.dll ${CURRENT_PACKAGES_DIR}/debug/bin/glfw3.dll) +endif() file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glfw3) file(RENAME ${CURRENT_PACKAGES_DIR}/share/glfw3/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/glfw3/copyright) |
