Skip to content

Commit

Permalink
[freerdp] Fix osx
Browse files Browse the repository at this point in the history
  • Loading branch information
dg0yt committed Jul 10, 2023
1 parent e31f8f8 commit 9b62f95
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ports/freerdp/cmake-project-include.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
find_package(PkgConfig REQUIRED)
if(CHANNEL_URBDRC)
pkg_check_modules(vcpkg_libusb REQUIRED libusb-1.0)
set(LIBUSB_1_INCLUDE_DIRS "${vcpkg_libusb_INCLUDE_DIRS}")
set(LIBUSB_1_LIBRARIES "${vcpkg_libusb_LINK_LIBRARIES}")
set(LIBUSB_1_INCLUDE_DIR "${vcpkg_libusb_INCLUDE_DIRS}")
set(LIBUSB_1_LIBRARY "${vcpkg_libusb_LINK_LIBRARIES}")
string(REPLACE "-Wl,-framework," "-framework " libusb_frameworks "${vcpkg_libusb_LDFLAGS}")
list(FILTER libusb_frameworks INCLUDE REGEX "^-framework ")
list(APPEND LIBUSB_1_LIBRARY ${libusb_frameworks})
endif()
if(WITH_FFMPEG)
# Exact pkg_check_modules signature as in project
pkg_check_modules(AVCODEC libavcodec)
set(AVCODEC_LIBRARY "${AVCODEC_LINK_LIBRARIES}")
pkg_check_modules(AVUTIL libavutil)
set(AVUTIL_LIBRARY "${AVUTIL_LINK_LIBRARIES}")
string(REPLACE "-Wl,-framework," "-framework " avutil_frameworks "${AVUTIL_LDFLAGS}")
list(FILTER avutil_frameworks INCLUDE REGEX "^-framework ")
list(APPEND AVUTIL_LIBRARY ${avutil_frameworks})
pkg_check_modules(SWRESAMPLE libswresample)
set(SWRESAMPLE_LIBRARY "${SWRESAMPLE_LINK_LIBRARIES}")
endif()
6 changes: 6 additions & 0 deletions ports/freerdp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,16 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
x11 WITH_X11
)

vcpkg_list(SET GENERATOR_OPTION)
if(VCPKG_TARGET_IS_OSX)
list(APPEND GENERATOR_OPTION GENERATOR "Unix Makefiles")
endif()

vcpkg_find_acquire_program(PKGCONFIG)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
${GENERATOR_OPTION}
OPTIONS
${FEATURE_OPTIONS}
"-DCMAKE_PROJECT_INCLUDE=${CMAKE_CURRENT_LIST_DIR}/cmake-project-include.cmake"
Expand Down

0 comments on commit 9b62f95

Please sign in to comment.