Files
linWIN/CMakeLists.txt
2025-05-09 13:50:51 +02:00

34 lines
897 B
CMake

cmake_minimum_required(VERSION 3.10)
project(linWIN)
set(CMAKE_CXX_STANDARD 20)
# Find and link X11
find_package(X11 REQUIRED)
include_directories(${X11_INCLUDE_DIR})
# Use pkg-config to find FFmpeg libraries
find_package(PkgConfig REQUIRED)
pkg_check_modules(FFMPEG REQUIRED libavformat libavcodec libavutil libswscale)
# Debug FFmpeg variables
message(STATUS "FFmpeg include dirs: ${FFMPEG_INCLUDE_DIRS}")
message(STATUS "FFmpeg libraries: ${FFMPEG_LIBRARIES}")
# Include directories for both FFmpeg and X11
include_directories(${X11_INCLUDE_DIR})
include_directories(${FFMPEG_INCLUDE_DIRS})
# Add the executable and all source files
add_executable(linWIN
src/window/main.cpp
src/window/X11Window.cpp
src/window/VideoPlayer.cpp
)
# Link FFmpeg and X11 (ensure FFmpeg libraries are linked before X11)
target_link_libraries(linWIN
${FFMPEG_LIBRARIES}
${X11_LIBRARIES}
)