diff options
| author | atkawa7 <atkawa7@yahoo.com> | 2017-05-25 08:45:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-25 08:45:58 -0700 |
| commit | 8d10c7ac34a0856877fed83a6e45986bdf1b1ef7 (patch) | |
| tree | d44984d0a6696e776ad5d237922ce7175e9a404e | |
| parent | f1bf4276955ef2b1d93b6181bdd89b5af836712f (diff) | |
| download | vcpkg-8d10c7ac34a0856877fed83a6e45986bdf1b1ef7.tar.gz vcpkg-8d10c7ac34a0856877fed83a6e45986bdf1b1ef7.zip | |
Use vcpkg_find_acquire_program
-used vcpkg_find_acquire_program
-added warning because dynamic building not supported
-removed duplicate command
| -rw-r--r-- | ports/thrift/portfile.cmake | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 419b5772c..af66b4a57 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -1,6 +1,11 @@ include(vcpkg_common_functions) -set(WINFLEXBISON_PATH ${CURRENT_BUILDTREES_DIR}/flex) +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported. Building static.") # See note below + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_find_acquire_program(WINFLEXBISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -10,25 +15,8 @@ vcpkg_from_github( HEAD_REF master ) -message(STATUS "download win flex bison") -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/winflexbison/files/win_flex_bison-latest.zip/download" - FILENAME "win_flex_bison-latest.zip" - SHA512 1a6c1fa3b7603df4db2efbb88c31b28ff1a641d4607afdb89e65e76aedf8da821979f1a9f5a1d291149a567c68346321dcbcffe0d517a836e7099b41dc6d9538 -) -message(STATUS "done download") - -file(MAKE_DIRECTORY "${WINFLEXBISON_PATH}") -vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} -E tar xfz ${ARCHIVE} - WORKING_DIRECTORY ${WINFLEXBISON_PATH} - LOGNAME extract-winflex -) - - -set(FLEX_EXECUTABLE "${WINFLEXBISON_PATH}/win_flex.exe") -set(BISON_EXECUTABLE "${WINFLEXBISON_PATH}/win_bison.exe") - +set(FLEX_EXECUTABLE "${DOWNLOADS}/tools/winflexbison/win_flex.exe") +set(BISON_EXECUTABLE "${DOWNLOADS}/tools/winflexbison/win_bison.exe") vcpkg_configure_cmake( @@ -40,10 +28,7 @@ vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/thrift RENAME copyright) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe") -file(GLOB DEBUG_EXES "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") if(EXES) file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) |
