Skip to content

Commit

Permalink
Disable cmake/{libabsl,libopenh264,libusrsctp,libvpx,libyuv}.cmake fo…
Browse files Browse the repository at this point in the history
…r packaged builds
  • Loading branch information
noiseless committed Dec 28, 2021
1 parent 5f049cc commit c5fc0b3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,16 @@ include(cmake/init_target.cmake)
include(cmake/generate_target.cmake)
include(cmake/target_yasm_sources.cmake)
include(cmake/external.cmake)
include(cmake/libabsl.cmake)
include(cmake/libopenh264.cmake)
include(cmake/libpffft.cmake)
include(cmake/librnnoise.cmake)
include(cmake/libsrtp.cmake)
include(cmake/libusrsctp.cmake)
include(cmake/libvpx.cmake)
include(cmake/libyuv.cmake)
if (NOT TG_OWT_PACKAGED_BUILD)

This comment has been minimized.

Copy link
@ilya-fedin

ilya-fedin Dec 29, 2021

Even with enabled packaged build, these targets will be used if no such library found. This breaks that logic.

This comment has been minimized.

Copy link
@noiseless

noiseless Dec 29, 2021

Author Owner

Is this conclusion the result of verification or a guess? I was able to build tg_owt and tdesktop using a packaged build by first removing libyuv from the OS. But yes, thanks for the comment, I will do more serious checks. I'll probably try different build variants in linux as well.

This comment has been minimized.

Copy link
@ilya-fedin

ilya-fedin Dec 29, 2021

Yes, this is a guess.
Look, libvpx target is defined here: https://github.com/desktop-app/tg_owt/blob/master/cmake/libvpx.cmake#L3
And it's used here, even if TG_OWT_PACKAGED_BUILD is true: https://github.com/desktop-app/tg_owt/blob/master/cmake/external.cmake#L175
But you disable these includes here when it's true.

This comment has been minimized.

Copy link
@noiseless

noiseless Dec 29, 2021

Author Owner

However, yes, without usrsctp I have already reproduced it (i.e. build failed). I'm working on it.

This comment has been minimized.

Copy link
@noiseless

noiseless Dec 29, 2021

Author Owner

For usrsctp it was fixed by adding include(cmake/libusrsctp.cmake) after if (NOT LIBUSRSCTP_FOUND). I will add the same for the rest of the deleted entities, check if cmake works after removing the relevant packages from the system, and come back with a patch after a successful test.

This comment has been minimized.

Copy link
@ilya-fedin

ilya-fedin Dec 29, 2021

You want to do like desktop-app#66? Unfortunately, such approach doesn't work. tg_owt will build successfully, but telegram-desktop will fail at link stage in snap package.

This comment has been minimized.

Copy link
@noiseless

noiseless Dec 29, 2021

Author Owner

Something like that, yeah. Thanks. So, I'll try it until the snap package build succeeds (I don't have much experience with snap, but I don't think I'll spend much time learning).

include(cmake/libabsl.cmake)
include(cmake/libopenh264.cmake)
include(cmake/libusrsctp.cmake)
include(cmake/libvpx.cmake)
include(cmake/libyuv.cmake)
endif()
if (APPLE)
include(cmake/libsdkmacos.cmake)
endif()
Expand Down

0 comments on commit c5fc0b3

Please sign in to comment.