diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b6096d56..a8480addc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,8 @@ jobs: steps: - name: Checkout Source Code uses: actions/checkout@v2 + with: + submodules: 'true' - name: Generate Patreon List env: @@ -67,26 +69,10 @@ jobs: if: github.event_name == 'push' continue-on-error: true - - name: Build Core Library - shell: bash - working-directory: ${{ runner.workspace }} - run: | - git clone https://github.com/olive-editor/core - cd core - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -G "${{ matrix.cmake-gen }}" \ - -DCMAKE_C_COMPILER="${{ matrix.cc-compiler }}" \ - -DCMAKE_CXX_COMPILER="${{ matrix.cxx-compiler }}" \ - -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/core/install" \ - $CMAKE_ARGS - ninja install - - name: Configure CMake run: | mkdir build cd build - PATH=$GITHUB_WORKSPACE/core/install:$PATH cmake .. -G "${{ matrix.cmake-gen }}" \ -DCMAKE_BUILD_TYPE="${{ matrix.build-type }}" \ -DCMAKE_C_COMPILER="${{ matrix.cc-compiler }}" \ @@ -172,6 +158,8 @@ jobs: steps: - name: Checkout Source Code uses: actions/checkout@v2 + with: + submodules: 'true' - name: Automatically Generate Package Name shell: bash @@ -218,25 +206,10 @@ jobs: if: github.event_name == 'push' continue-on-error: true - - name: Build Core Library - shell: bash - working-directory: ${{ runner.workspace }} - run: | - git clone https://github.com/olive-editor/core - cd core - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -G "${{ matrix.cmake-gen }}" \ - -DCMAKE_INSTALL_PREFIX="install" \ - $CMAKE_ARGS - ninja install - echo "$(pwd -W)/install" >> $GITHUB_PATH - - name: Configure CMake shell: bash working-directory: ${{ runner.workspace }}/build run: | - PATH=$GITHUB_WORKSPACE/core/install:$PATH cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -G "${{ matrix.cmake-gen }}" \ $CMAKE_ARGS @@ -339,6 +312,8 @@ jobs: steps: - name: Checkout Source Code uses: actions/checkout@v2 + with: + submodules: 'true' - name: Automatically Generate Package Name shell: bash @@ -382,27 +357,11 @@ jobs: brew update brew install ninja - - name: Build Core Library - shell: bash - working-directory: ${{ runner.workspace }} - run: | - git clone https://github.com/olive-editor/core - cd core - mkdir build - cd build - PATH=$DEP_LOCATION:$DEP_LOCATION/bin:$DEP_LOCATION/include:$DEP_LOCATION/lib:$DEP_LOCATION/crashpad:$PATH \ - cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=${{ matrix.min-deploy }} -G "${{ matrix.cmake-gen }}" \ - -DCMAKE_OSX_ARCHITECTURES="${{ matrix.os-arch }}" \ - -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/core/install" \ - $CMAKE_ARGS - ninja install - - name: Configure CMake shell: bash working-directory: ${{ runner.workspace }}/build run: | - PATH=$DEP_LOCATION:$DEP_LOCATION/bin:$DEP_LOCATION/include:$DEP_LOCATION/lib:$DEP_LOCATION/crashpad:$GITHUB_WORKSPACE/core/install:$PATH \ + PATH=$DEP_LOCATION:$DEP_LOCATION/bin:$DEP_LOCATION/include:$DEP_LOCATION/lib:$DEP_LOCATION/crashpad:$PATH \ cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ -DCMAKE_OSX_DEPLOYMENT_TARGET=${{ matrix.min-deploy }} -G "${{ matrix.cmake-gen }}" \ -DCMAKE_OSX_ARCHITECTURES="${{ matrix.os-arch }}" \ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..5a50ca48f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "ext/core"] + path = ext/core + url = https://github.com/olive-editor/core +[submodule "ext/KDDockWidgets"] + path = ext/KDDockWidgets + url = https://github.com/KDAB/KDDockWidgets diff --git a/CMakeLists.txt b/CMakeLists.txt index c5bec90e7..1ef6c712a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # Olive - Non-Linear Video Editor -# Copyright (C) 2022 Olive Team +# Copyright (C) 2023 Olive Studios LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -95,12 +95,8 @@ list(APPEND OLIVE_LIBRARIES ${OPENEXR_LIBRARIES}) list(APPEND OLIVE_INCLUDE_DIRS ${OPENEXR_INCLUDES}) # Link Olive -find_package(Olive REQUIRED - COMPONENTS - Core -) -list(APPEND OLIVE_LIBRARIES ${LIBOLIVE_LIBRARIES}) -list(APPEND OLIVE_INCLUDE_DIRS ${LIBOLIVE_INCLUDE_DIRS}) +list(APPEND OLIVE_LIBRARIES olivecore) +list(APPEND OLIVE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/ext/core/include) # Link Qt set(QT_LIBRARIES @@ -152,10 +148,10 @@ if (${QT_VERSION_MAJOR} EQUAL "6") ) # Link KDDockWidgets - find_package(KDDockWidgets-qt6 CONFIG REQUIRED) + #find_package(KDDockWidgets-qt6 CONFIG REQUIRED) else() # Link KDDockWidgets - find_package(KDDockWidgets CONFIG REQUIRED) + #find_package(KDDockWidgets CONFIG REQUIRED) endif() list(APPEND OLIVE_LIBRARIES @@ -251,6 +247,7 @@ endif() set(CMAKE_INCLUDE_CURRENT_DIR ON) list(APPEND OLIVE_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/ext) +add_subdirectory(ext) add_subdirectory(app) if (BUILD_TESTS) diff --git a/cmake/FindFFMPEG.cmake b/cmake/FindFFMPEG.cmake index 458784541..3d36bb09a 100644 --- a/cmake/FindFFMPEG.cmake +++ b/cmake/FindFFMPEG.cmake @@ -30,6 +30,10 @@ are guaranteed to set these variables or provide targets. #]==] function (_ffmpeg_find component headername) + if (${FFMPEG_${component}_FOUND}) + return() + endif() + find_path("FFMPEG_${component}_INCLUDE_DIR" NAMES "lib${component}/${headername}" diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt new file mode 100644 index 000000000..efa25d8a3 --- /dev/null +++ b/ext/CMakeLists.txt @@ -0,0 +1,18 @@ +# Olive - Non-Linear Video Editor +# Copyright (C) 2023 Olive Studios LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +add_subdirectory(core) +add_subdirectory(KDDockWidgets) diff --git a/ext/KDDockWidgets b/ext/KDDockWidgets new file mode 160000 index 000000000..c744291d3 --- /dev/null +++ b/ext/KDDockWidgets @@ -0,0 +1 @@ +Subproject commit c744291d3387185b5e3df56d7064fbbba66c67d5 diff --git a/ext/core b/ext/core new file mode 160000 index 000000000..277792824 --- /dev/null +++ b/ext/core @@ -0,0 +1 @@ +Subproject commit 277792824801495e868580ca86f6e7a1b53e4779