Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken build. #44

Merged
merged 2 commits into from
Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project("Composer" CXX C)
cmake_minimum_required(VERSION 2.6)
cmake_policy(VERSION 2.6)
set(PROJECT_VERSION "2.0")
cmake_minimum_required(VERSION 3.0)
cmake_policy(VERSION 3.0)
set(PROJECT_VERSION "2.0.1")
set(BUILD_SHARED_LIBS OFF)
#FIXME: Changes in version number or project name must manually also be put to:
# platform/mingw-cross-env/makeinstaller.py
Expand All @@ -27,15 +27,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)

# Find all the libs that don't require extra parameters
foreach(lib AVFormat SWResample SWScale Qt5Core Qt5Widgets Qt5Gui Qt5Xml Qt5Multimedia)
find_package(${lib} REQUIRED)
include_directories(${${lib}_INCLUDE_DIRS})
list(APPEND LIBS ${${lib}_LIBRARIES})
add_definitions(${${lib}_DEFINITIONS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${lib}_EXECUTABLE_COMPILE_FLAGS}")
endforeach(lib)

# Sources
add_subdirectory(src)

8 changes: 3 additions & 5 deletions cmake/FindAVCodec.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ libfind_pkg_check_modules(AVCodec_PKGCONF libavcodec)

find_path(AVCodec_INCLUDE_DIR
NAMES libavcodec/avcodec.h ffmpeg/avcodec.h avcodec.h
PATHS ${AVCodec_PKGCONF_INCLUDE_DIRS}
HINTS ${AVCodec_PKGCONF_INCLUDE_DIRS}
PATH_SUFFIXES ffmpeg
)

if(AVCodec_INCLUDE_DIR)
foreach(suffix libavcodec/ ffmpeg/ "")
if(NOT AVCodec_INCLUDE)
if(EXISTS "${AVCodec_INCLUDE_DIR}/${suffix}avcodec.h")
set(AVCodec_INCLUDE "${suffix}avcodec.h")
set(AVCodec_INCLUDE "${suffix}avcodec.h" CACHE INTERNAL "")
endif(EXISTS "${AVCodec_INCLUDE_DIR}/${suffix}avcodec.h")
endif(NOT AVCodec_INCLUDE)
endforeach(suffix)
Expand All @@ -39,10 +39,8 @@ endif(AVCodec_INCLUDE_DIR)

find_library(AVCodec_LIBRARY
NAMES libavcodec.dll.a avcodec
PATHS ${AVCodec_PKGCONF_LIBRARY_DIRS}
HINTS ${AVCodec_PKGCONF_LIBRARY_DIRS}
)

set(AVCodec_PROCESS_INCLUDES AVCodec_INCLUDE_DIR AVUtil_INCLUDE_DIRS)
set(AVCodec_PROCESS_LIBS AVCodec_LIBRARY AVUtil_LIBRARIES)
libfind_process(AVCodec)

6 changes: 2 additions & 4 deletions cmake/FindAVFormat.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ libfind_pkg_check_modules(AVFormat_PKGCONF libavformat)

find_path(AVFormat_INCLUDE_DIR
NAMES libavformat/avformat.h ffmpeg/avformat.h avformat.h
PATHS ${AVFormat_PKGCONF_INCLUDE_DIRS}
HINTS ${AVFormat_PKGCONF_INCLUDE_DIRS}
PATH_SUFFIXES ffmpeg
)

Expand All @@ -37,10 +37,8 @@ endif(AVFormat_INCLUDE_DIR)

find_library(AVFormat_LIBRARY
NAMES libavformat.dll.a avformat
PATHS ${AVFormat_PKGCONF_LIBRARY_DIRS}
HINTS ${AVFormat_PKGCONF_LIBRARY_DIRS}
)

set(AVFormat_PROCESS_INCLUDES AVFormat_INCLUDE_DIR AVCodec_INCLUDE_DIRS)
set(AVFormat_PROCESS_LIBS AVFormat_LIBRARY AVCodec_LIBRARIES)
libfind_process(AVFormat)

6 changes: 2 additions & 4 deletions cmake/FindAVUtil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ libfind_pkg_check_modules(AVUtil_PKGCONF libavutil)

find_path(AVUtil_INCLUDE_DIR
NAMES libavutil/avutil.h ffmpeg/avutil.h avutil.h
PATHS ${AVUtil_PKGCONF_INCLUDE_DIRS}
HINTS ${AVUtil_PKGCONF_INCLUDE_DIRS}
PATH_SUFFIXES ffmpeg
)

Expand All @@ -35,10 +35,8 @@ endif(AVUtil_INCLUDE_DIR)

find_library(AVUtil_LIBRARY
NAMES libavutil.dll.a avutil
PATHS ${AVUtil_PKGCONF_LIBRARY_DIRS}
HINTS ${AVUtil_PKGCONF_LIBRARY_DIRS}
)

set(AVUtil_PROCESS_INCLUDES AVUtil_INCLUDE_DIR)
set(AVUtil_PROCESS_LIBS AVUtil_LIBRARY)
libfind_process(AVUtil)

6 changes: 2 additions & 4 deletions cmake/FindSWScale.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ libfind_pkg_check_modules(SWScale_PKGCONF libswscale)

find_path(SWScale_INCLUDE_DIR
NAMES libswscale/swscale.h ffmpeg/swscale.h swscale.h
PATHS ${SWScale_PKGCONF_INCLUDE_DIRS}
HINTS ${SWScale_PKGCONF_INCLUDE_DIRS}
PATH_SUFFIXES ffmpeg
)

Expand All @@ -37,10 +37,8 @@ endif(SWScale_INCLUDE_DIR)

find_library(SWScale_LIBRARY
NAMES libswscale.dll.a swscale
PATHS ${SWScale_PKGCONF_LIBRARY_DIRS}
HINTS ${SWScale_PKGCONF_LIBRARY_DIRS}
)

set(SWScale_PROCESS_INCLUDES SWScale_INCLUDE_DIR AVUtil_INCLUDE_DIRS)
set(SWScale_PROCESS_LIBS SWScale_LIBRARY AVUtil_LIBRARIES)
libfind_process(SWScale)

Loading