diff options
| author | NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> | 2020-01-13 16:34:54 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2020-01-13 16:34:54 -0800 |
| commit | 066c7b9879e77450af64b03f20362a653407e4d6 (patch) | |
| tree | 8b09bfb6e35df1462d532d765d0d2a6b7504dfe4 | |
| parent | 299c7c730ca759ef3dee365a2ecd7c3dd39db8a6 (diff) | |
| download | vcpkg-066c7b9879e77450af64b03f20362a653407e4d6.tar.gz vcpkg-066c7b9879e77450af64b03f20362a653407e4d6.zip | |
[vcpkg] Fix build type in vcpkg_build_make.cmake (#9602)
* [vcpkg] Fix build type in vcpkg_build_make.cmake
* Update x264 and libosip to test vcpkg_build_make() function
* [x264] Update portfile.cmake
| -rw-r--r-- | ports/libosip2/CONTROL | 2 | ||||
| -rw-r--r-- | ports/x264/CONTROL | 4 | ||||
| -rw-r--r-- | ports/x264/portfile.cmake | 11 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_build_make.cmake | 58 |
4 files changed, 36 insertions, 39 deletions
diff --git a/ports/libosip2/CONTROL b/ports/libosip2/CONTROL index 3781c111f..693a9d73e 100644 --- a/ports/libosip2/CONTROL +++ b/ports/libosip2/CONTROL @@ -1,4 +1,4 @@ Source: libosip2 -Version: 5.1.0-2 +Version: 5.1.0-3 Homepage: https://www.gnu.org/software/osip/ Description: oSIP is an LGPL implementation of SIP. It's stable, portable, flexible and compliant! -may be more-! It is used mostly with eXosip2 stack (GPL) which provides simpler API for User-Agent implementation.
\ No newline at end of file diff --git a/ports/x264/CONTROL b/ports/x264/CONTROL index fe19e1b39..58dab0c35 100644 --- a/ports/x264/CONTROL +++ b/ports/x264/CONTROL @@ -1,4 +1,4 @@ Source: x264 -Version: 157-303c484ec828ed0-6 +Version: 157-303c484ec828ed0-7 Homepage: https://github.com/mirror/x264 -Description: x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format +Description: x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format
\ No newline at end of file diff --git a/ports/x264/portfile.cmake b/ports/x264/portfile.cmake index ea72b2ad2..d1ed982a5 100644 --- a/ports/x264/portfile.cmake +++ b/ports/x264/portfile.cmake @@ -1,10 +1,6 @@ -include(vcpkg_common_functions) - set(X264_VERSION 157) -if (NOT VCPKG_TARGET_IS_WINDOWS) - message(FATAL_ERROR "x264 only support windows.") -endif() +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -32,7 +28,7 @@ vcpkg_configure_make( vcpkg_install_make() -if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(NOT VCPKG_TARGET_IS_UWP) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/x264) file(RENAME ${CURRENT_PACKAGES_DIR}/bin/x264.exe ${CURRENT_PACKAGES_DIR}/tools/x264/x264.exe) endif() @@ -61,5 +57,4 @@ endif() vcpkg_copy_pdbs() -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/x264) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/x264/COPYING ${CURRENT_PACKAGES_DIR}/share/x264/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
\ No newline at end of file diff --git a/scripts/cmake/vcpkg_build_make.cmake b/scripts/cmake/vcpkg_build_make.cmake index d928a9287..202ef33f4 100644 --- a/scripts/cmake/vcpkg_build_make.cmake +++ b/scripts/cmake/vcpkg_build_make.cmake @@ -142,37 +142,39 @@ function(vcpkg_build_make) if (_bc_ENABLE_INSTALL)
foreach(BUILDTYPE "debug" "release")
- if(BUILDTYPE STREQUAL "debug")
- # Skip debug generate
- if (_VCPKG_NO_DEBUG)
- continue()
- endif()
- set(SHORT_BUILDTYPE "-dbg")
- else()
- # In NO_DEBUG mode, we only use ${TARGET_TRIPLET} directory.
- if (_VCPKG_NO_DEBUG)
- set(SHORT_BUILDTYPE "")
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL BUILDTYPE)
+ if(BUILDTYPE STREQUAL "debug")
+ # Skip debug generate
+ if (_VCPKG_NO_DEBUG)
+ continue()
+ endif()
+ set(SHORT_BUILDTYPE "-dbg")
else()
- set(SHORT_BUILDTYPE "-rel")
+ # In NO_DEBUG mode, we only use ${TARGET_TRIPLET} directory.
+ if (_VCPKG_NO_DEBUG)
+ set(SHORT_BUILDTYPE "")
+ else()
+ set(SHORT_BUILDTYPE "-rel")
+ endif()
endif()
- endif()
- message(STATUS "Installing ${TARGET_TRIPLET}${SHORT_BUILDTYPE}")
- if (CMAKE_HOST_WIN32)
- # In windows we can remotely call make
- set(WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE})
- vcpkg_execute_build_process(
- COMMAND "${MAKE} ${INSTALL_OPTS}"
- WORKING_DIRECTORY ${WORKING_DIRECTORY}
- LOGNAME "install-${TARGET_TRIPLET}${SHORT_BUILDTYPE}"
- )
- else()
- set(WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}${_VCPKG_PROJECT_SUBPATH})
- vcpkg_execute_build_process(
- COMMAND "${MAKE};${INSTALL_OPTS}"
- WORKING_DIRECTORY ${WORKING_DIRECTORY}
- LOGNAME "install-${TARGET_TRIPLET}${SHORT_BUILDTYPE}"
- )
+ message(STATUS "Installing ${TARGET_TRIPLET}${SHORT_BUILDTYPE}")
+ if (CMAKE_HOST_WIN32)
+ # In windows we can remotely call make
+ set(WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE})
+ vcpkg_execute_build_process(
+ COMMAND "${MAKE} ${INSTALL_OPTS}"
+ WORKING_DIRECTORY ${WORKING_DIRECTORY}
+ LOGNAME "install-${TARGET_TRIPLET}${SHORT_BUILDTYPE}"
+ )
+ else()
+ set(WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}${_VCPKG_PROJECT_SUBPATH})
+ vcpkg_execute_build_process(
+ COMMAND "${MAKE};${INSTALL_OPTS}"
+ WORKING_DIRECTORY ${WORKING_DIRECTORY}
+ LOGNAME "install-${TARGET_TRIPLET}${SHORT_BUILDTYPE}"
+ )
+ endif()
endif()
endforeach()
endif()
|
