Skip to content

Commit

Permalink
[ffmpeg] Pass Vcpkg compiler and linker flags to build script
Browse files Browse the repository at this point in the history
  • Loading branch information
koprok committed Oct 14, 2019
1 parent 80aa0ab commit 20d49dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ports/ffmpeg/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: ffmpeg
Version: 4.2
Version: 4.2-1
Build-Depends: zlib
Homepage: https://ffmpeg.org
Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.
Expand Down
4 changes: 4 additions & 0 deletions ports/ffmpeg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ message(STATUS "Building Options: ${OPTIONS}")
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)
message(STATUS "Building Relase Options: ${OPTIONS_RELEASE}")
set(ENV{${LIB_PATH_VAR}} "${CURRENT_INSTALLED_DIR}/lib${SEP}${ENV_LIB_PATH}")
set(ENV{CFLAGS} "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE}")
set(ENV{LDFLAGS} "${VCPKG_LINKER_FLAGS}")
message(STATUS "Building ${_csc_PROJECT_PATH} for Release")
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
vcpkg_execute_required_process(
Expand All @@ -199,6 +201,8 @@ endif()
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
message(STATUS "Building Debug Options: ${OPTIONS_DEBUG}")
set(ENV{${LIB_PATH_VAR}} "${CURRENT_INSTALLED_DIR}/debug/lib${SEP}${ENV_LIB_PATH}")
set(ENV{CFLAGS} "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG}")
set(ENV{LDFLAGS} "${VCPKG_LINKER_FLAGS}")
message(STATUS "Building ${_csc_PROJECT_PATH} for Debug")
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
vcpkg_execute_required_process(
Expand Down

0 comments on commit 20d49dc

Please sign in to comment.