shitty initial commit
This commit is contained in:
33
CMakeLists.txt
Normal file
33
CMakeLists.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
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}
|
||||
)
|
||||
Reference in New Issue
Block a user