Support generate makefile

This commit is contained in:
dijunkun
2023-11-17 00:38:13 -08:00
parent 6776b915da
commit 4a16857da8
3 changed files with 20 additions and 13 deletions

View File

@@ -20,7 +20,7 @@ X11SessionImpl::~X11SessionImpl() {
void X11SessionImpl::Release() { delete this; }
int X11SessionImpl::Initialize() {}
int X11SessionImpl::Initialize() { return 0; }
void X11SessionImpl::RegisterObserver(x11_session_observer *observer) {
observer_ = observer;

View File

@@ -28,7 +28,7 @@ package("ffmpeg")
add_versions("git:5.0.1", "n5.0.1")
add_versions("git:4.0.2", "n4.0.2")
add_configs("gpl", {description = "Enable GPL code", default = true, type = "boolean"})
add_configs("gpl", {description = "Enable GPL code", default = false, type = "boolean"})
add_configs("ffprobe", {description = "Enable ffprobe program.", default = false, type = "boolean"})
add_configs("ffmpeg", {description = "Enable ffmpeg program.", default = true, type = "boolean"})
add_configs("ffplay", {description = "Enable ffplay program.", default = false, type = "boolean"})
@@ -42,14 +42,14 @@ package("ffmpeg")
add_configs("vdpau", {description = "Enable vdpau library.", default = false, type = "boolean"})
add_configs("hardcoded-tables", {description = "Enable hardcoded tables.", default = true, type = "boolean"})
add_configs("asm", {description = "Enable asm", default = false, type = "boolean"})
add_configs("libx264", {description = "Enable libx264", default = true, type = "boolean"})
add_configs("libopenh264", {description = "Enable libopenh264", default = true, type = "boolean"})
end
add_links("avfilter", "avdevice", "avformat", "avcodec", "swscale", "swresample", "avutil")
if is_plat("macosx") then
add_frameworks("CoreFoundation", "Foundation", "CoreVideo", "CoreMedia", "AudioToolbox", "VideoToolbox", "Security")
elseif is_plat("linux") then
add_syslinks("pthread")
add_syslinks("pthread", "openh264")
end
if is_plat("linux", "macosx") then

View File

@@ -68,13 +68,20 @@ target("remote_desk")
"-lxcb-shm", "-lXext", "-lX11", "-lXv", "-ldl", "-lpthread",
{force = true})
end
after_install(function (target)
os.cp("$(projectdir)/thirdparty/nvcodec/Lib/x64/*.so", "$(projectdir)/out/bin")
os.cp("$(projectdir)/thirdparty/nvcodec/Lib/x64/*.so.1", "$(projectdir)/out/bin")
os.cp("$(projectdir)/out/lib/*.so", "$(projectdir)/out/bin")
os.rm("$(projectdir)/out/include")
os.rm("$(projectdir)/out/lib")
end)
target("linux_capture")
set_kind("binary")
add_packages("sdl2", "imgui", "ffmpeg", "openh264")
add_files("remote_desk_gui/linux_capture.cpp")
add_ldflags("-lavformat", "-lavdevice", "-lavfilter", "-lavcodec",
"-lswscale", "-lavutil", "-lswresample",
"-lasound", "-lxcb-shape", "-lxcb-xfixes", "-lsndio", "-lxcb",
"-lxcb-shm", "-lXext", "-lX11", "-lXv", "-lpthread", "-lSDL2", "-lopenh264",
"-ldl" ,{force = true})
-- target("linux_capture")
-- set_kind("binary")
-- add_packages("sdl2", "imgui", "ffmpeg", "openh264")
-- add_files("remote_desk_gui/linux_capture.cpp")
-- add_ldflags("-lavformat", "-lavdevice", "-lavfilter", "-lavcodec",
-- "-lswscale", "-lavutil", "-lswresample",
-- "-lasound", "-lxcb-shape", "-lxcb-xfixes", "-lsndio", "-lxcb",
-- "-lxcb-shm", "-lXext", "-lX11", "-lXv", "-lpthread", "-lSDL2", "-lopenh264",
-- "-ldl" ,{force = true})