Skip to content

Commit

Permalink
use submodules for core library and kddockwidgets
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmattkc committed Feb 17, 2023
1 parent 25b6b07 commit d957611
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 57 deletions.
55 changes: 7 additions & 48 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
steps:
- name: Checkout Source Code
uses: actions/checkout@v2
with:
submodules: 'true'

- name: Generate Patreon List
env:
Expand All @@ -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 }}" \
Expand Down Expand Up @@ -172,6 +158,8 @@ jobs:
steps:
- name: Checkout Source Code
uses: actions/checkout@v2
with:
submodules: 'true'

- name: Automatically Generate Package Name
shell: bash
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -339,6 +312,8 @@ jobs:
steps:
- name: Checkout Source Code
uses: actions/checkout@v2
with:
submodules: 'true'

- name: Automatically Generate Package Name
shell: bash
Expand Down Expand Up @@ -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 }}" \
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
15 changes: 6 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions cmake/FindFFMPEG.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
18 changes: 18 additions & 0 deletions ext/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.

add_subdirectory(core)
add_subdirectory(KDDockWidgets)
1 change: 1 addition & 0 deletions ext/KDDockWidgets
Submodule KDDockWidgets added at c74429
1 change: 1 addition & 0 deletions ext/core
Submodule core added at 277792

0 comments on commit d957611

Please sign in to comment.