forked from desktop-app/cmake_helpers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
382380d
commit af968dc
Showing
22 changed files
with
461 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# This file is part of Desktop App Toolkit, | ||
# a set of libraries for developing nice desktop applications. | ||
# | ||
# For license and copyright information please follow this link: | ||
# https://github.com/desktop-app/legal/blob/master/LEGAL | ||
|
||
add_library(external_ffmpeg INTERFACE IMPORTED GLOBAL) | ||
add_library(desktop-app::external_ffmpeg ALIAS external_ffmpeg) | ||
|
||
target_include_directories(external_ffmpeg SYSTEM | ||
INTERFACE | ||
${libs_loc}/ffmpeg | ||
) | ||
|
||
set(ffmpeg_lib_loc ${libs_loc}/ffmpeg) | ||
|
||
target_link_libraries(external_ffmpeg | ||
INTERFACE | ||
${ffmpeg_lib_loc}/libavformat/libavformat.a | ||
${ffmpeg_lib_loc}/libavcodec/libavcodec.a | ||
${ffmpeg_lib_loc}/libswresample/libswresample.a | ||
${ffmpeg_lib_loc}/libswscale/libswscale.a | ||
${ffmpeg_lib_loc}/libavutil/libavutil.a | ||
) | ||
if (LINUX) | ||
target_link_static_libraries(external_ffmpeg | ||
INTERFACE | ||
va-x11 | ||
va-drm | ||
va | ||
vdpau | ||
drm | ||
Xi | ||
Xext | ||
Xfixes | ||
Xrender | ||
) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# This file is part of Desktop App Toolkit, | ||
# a set of libraries for developing nice desktop applications. | ||
# | ||
# For license and copyright information please follow this link: | ||
# https://github.com/desktop-app/legal/blob/master/LEGAL | ||
|
||
if (LINUX) | ||
add_library(linux_glibc_wraps STATIC) | ||
add_library(desktop-app::linux_glibc_wraps ALIAS linux_glibc_wraps) | ||
|
||
get_filename_component(src_loc . REALPATH) | ||
|
||
nice_target_sources(linux_glibc_wraps ${src_loc} | ||
PRIVATE | ||
platform/linux/linux_glibc_wraps.c | ||
platform/linux/linux_glibc_wraps_32.c | ||
platform/linux/linux_glibc_wraps_64.c | ||
) | ||
if (NOT build_linux32) | ||
set_source_files_properties(${src_loc}/platform/linux/linux_glibc_wraps_32.c PROPERTIES HEADER_FILE_ONLY TRUE) | ||
else() | ||
set_source_files_properties(${src_loc}/platform/linux/linux_glibc_wraps_64.c PROPERTIES HEADER_FILE_ONLY TRUE) | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// This file is part of Desktop App Toolkit, | ||
// a set of libraries for developing nice desktop applications. | ||
// | ||
// For license and copyright information please follow this link: | ||
// https://github.com/desktop-app/legal/blob/master/LEGAL | ||
// | ||
#include <stdlib.h> | ||
#include <unistd.h> | ||
#include <sys/types.h> | ||
|
||
void *__wrap_aligned_alloc(size_t alignment, size_t size) { | ||
void *result = NULL; | ||
return (posix_memalign(&result, alignment, size) == 0) | ||
? result | ||
: NULL; | ||
} | ||
|
||
int enable_secure_inited = 0; | ||
int enable_secure = 1; | ||
|
||
char *__wrap_secure_getenv(const char *name) { | ||
if (enable_secure_inited == 0) { | ||
enable_secure_inited = 1; | ||
enable_secure = (geteuid() != getuid()) | ||
|| (getegid() != getgid()); | ||
} | ||
return enable_secure ? NULL : getenv(name); | ||
} | ||
|
Oops, something went wrong.