ci/cmake: just compile as an object
This commit is contained in:
+14
-16
@@ -72,7 +72,7 @@ jobs:
|
|||||||
- name: Test
|
- name: Test
|
||||||
working-directory: build
|
working-directory: build
|
||||||
run: |
|
run: |
|
||||||
ctest -C ${{ matrix.build-type }} -V
|
ctest -C ${{ matrix.build-type }}
|
||||||
|
|
||||||
- name: Create Package
|
- name: Create Package
|
||||||
id: package
|
id: package
|
||||||
@@ -91,18 +91,17 @@ jobs:
|
|||||||
appdir/usr/share/applications/org.olivevideoeditor.Olive.desktop \
|
appdir/usr/share/applications/org.olivevideoeditor.Olive.desktop \
|
||||||
-exclude-libs=libQt5Pdf.so,libQt5Qml.so,libQt5QmlModels.so,libQt5Quick.so,libQt5VirtualKeyboard.so \
|
-exclude-libs=libQt5Pdf.so,libQt5Qml.so,libQt5QmlModels.so,libQt5Quick.so,libQt5VirtualKeyboard.so \
|
||||||
-bundle-non-qt-libs \
|
-bundle-non-qt-libs \
|
||||||
-executable=appdir/usr/lib/libolive-editor \
|
|
||||||
-executable=appdir/usr/bin/crashpad_handler \
|
-executable=appdir/usr/bin/crashpad_handler \
|
||||||
-executable=appdir/usr/bin/minidump_stackwalk \
|
-executable=appdir/usr/bin/minidump_stackwalk \
|
||||||
-executable=appdir/usr/bin/olive-crashhandler \
|
-executable=appdir/usr/bin/olive-crashhandler \
|
||||||
--appimage-extract-and-run
|
--appimage-extract-and-run
|
||||||
|
|
||||||
# Dump Crashpad symbols
|
# Dump Crashpad symbols
|
||||||
dump_syms appdir/usr/lib/libolive-editor.so > libolive-editor.sym
|
dump_syms appdir/usr/bin/olive-editor > olive-editor.sym
|
||||||
# HACK: For some reason, minidump_stackwalk reads identifier as all 0s
|
# HACK: For some reason, minidump_stackwalk reads identifier as all 0s
|
||||||
SYM_DIR=appdir/usr/share/olive-editor/symbols/libolive-editor.so/000000000000000000000000000000000
|
SYM_DIR=appdir/usr/share/olive-editor/symbols/olive-editor/000000000000000000000000000000000
|
||||||
mkdir -p "$SYM_DIR"
|
mkdir -p "$SYM_DIR"
|
||||||
mv libolive-editor.sym "$SYM_DIR"
|
mv olive-editor.sym "$SYM_DIR"
|
||||||
|
|
||||||
# Package AppImage
|
# Package AppImage
|
||||||
$DOWNLOAD_TOOL https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage
|
$DOWNLOAD_TOOL https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage
|
||||||
@@ -199,7 +198,7 @@ jobs:
|
|||||||
working-directory: ${{ runner.workspace }}/build
|
working-directory: ${{ runner.workspace }}/build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
ctest -C ${{ matrix.build-type }} -V
|
ctest -C ${{ matrix.build-type }}
|
||||||
|
|
||||||
- name: Create Package
|
- name: Create Package
|
||||||
working-directory: ${{ runner.workspace }}/build
|
working-directory: ${{ runner.workspace }}/build
|
||||||
@@ -209,9 +208,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir olive-editor
|
mkdir olive-editor
|
||||||
cp app/olive-editor.exe olive-editor
|
cp app/olive-editor.exe olive-editor
|
||||||
cp app/crashhandler/olive-crashhandler.exe olive-editor
|
cp app/olive-crashhandler.exe olive-editor
|
||||||
cp app/olive-editor.pdb olive-editor
|
cp app/olive-editor.pdb olive-editor
|
||||||
cp app/libolive-editor.pdb olive-editor
|
|
||||||
$DEP_LOCATION/bin/windeployqt olive-editor/olive-crashhandler.exe
|
$DEP_LOCATION/bin/windeployqt olive-editor/olive-crashhandler.exe
|
||||||
$DEP_LOCATION/bin/windeployqt olive-editor/olive-editor.exe
|
$DEP_LOCATION/bin/windeployqt olive-editor/olive-editor.exe
|
||||||
cp $(cygpath $DEP_LOCATION)/bin/*.dll olive-editor
|
cp $(cygpath $DEP_LOCATION)/bin/*.dll olive-editor
|
||||||
@@ -223,11 +221,11 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
curl -fLSs https://github.com/google/breakpad/blob/master/src/tools/windows/binaries/dump_syms.exe?raw=true > dump_syms.exe
|
curl -fLSs https://github.com/google/breakpad/blob/master/src/tools/windows/binaries/dump_syms.exe?raw=true > dump_syms.exe
|
||||||
./dump_syms app/libolive-editor.pdb > libolive-editor.sym
|
./dump_syms app/olive-editor.pdb > olive-editor.sym
|
||||||
SYM_HEADER=($(head -n 1 libolive-editor.sym)) # Read first line of symbol file
|
SYM_HEADER=($(head -n 1 olive-editor.sym)) # Read first line of symbol file
|
||||||
SYM_DIR=olive-editor/symbols/libolive-editor.pdb/${SYM_HEADER[3]}
|
SYM_DIR=olive-editor/symbols/olive-editor.pdb/${SYM_HEADER[3]}
|
||||||
mkdir -p "$SYM_DIR"
|
mkdir -p "$SYM_DIR"
|
||||||
mv libolive-editor.sym "$SYM_DIR"
|
mv olive-editor.sym "$SYM_DIR"
|
||||||
|
|
||||||
- name: Deploy Packages
|
- name: Deploy Packages
|
||||||
working-directory: ${{ runner.workspace }}/build
|
working-directory: ${{ runner.workspace }}/build
|
||||||
@@ -340,7 +338,7 @@ jobs:
|
|||||||
working-directory: ${{ runner.workspace }}/build
|
working-directory: ${{ runner.workspace }}/build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
ctest -C ${{ matrix.build-type }} -V
|
ctest -C ${{ matrix.build-type }}
|
||||||
|
|
||||||
- name: Create Package
|
- name: Create Package
|
||||||
working-directory: ${{ runner.workspace }}/build
|
working-directory: ${{ runner.workspace }}/build
|
||||||
@@ -363,9 +361,9 @@ jobs:
|
|||||||
install_name_tool -change libmodplug.dylib @rpath/libmodplug.dylib $BUNDLE_NAME/Contents/Frameworks/libavfilter.*
|
install_name_tool -change libmodplug.dylib @rpath/libmodplug.dylib $BUNDLE_NAME/Contents/Frameworks/libavfilter.*
|
||||||
|
|
||||||
# Crashpad symbols
|
# Crashpad symbols
|
||||||
$DEP_LOCATION/bin/dump_syms $BUNDLE_NAME/Contents/Resources/libolive-editor.dylib > libolive-editor.sym
|
$DEP_LOCATION/bin/dump_syms $BUNDLE_NAME/Contents/MacOS/Olive > Olive.sym
|
||||||
SYM_HEADER=($(head -n 1 libolive-editor.sym)) # Read first line of symbol file
|
SYM_HEADER=($(head -n 1 Olive.sym)) # Read first line of symbol file
|
||||||
SYM_DIR=$BUNDLE_NAME/Contents/Resources/symbols/libolive-editor.dylib/${SYM_HEADER[3]}
|
SYM_DIR=$BUNDLE_NAME/Contents/Resources/symbols/Olive/${SYM_HEADER[3]}
|
||||||
mkdir -p "$SYM_DIR"
|
mkdir -p "$SYM_DIR"
|
||||||
mv Olive.sym "$SYM_DIR"
|
mv Olive.sym "$SYM_DIR"
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -46,7 +46,7 @@ add_subdirectory(window)
|
|||||||
|
|
||||||
# Add main library
|
# Add main library
|
||||||
add_library(libolive-editor
|
add_library(libolive-editor
|
||||||
SHARED
|
OBJECT
|
||||||
${OLIVE_SOURCES}
|
${OLIVE_SOURCES}
|
||||||
${OLIVE_RESOURCES}
|
${OLIVE_RESOURCES}
|
||||||
)
|
)
|
||||||
@@ -57,6 +57,7 @@ set_target_properties(libolive-editor PROPERTIES PREFIX "")
|
|||||||
# Add applicaton
|
# Add applicaton
|
||||||
add_executable(olive-editor
|
add_executable(olive-editor
|
||||||
main.cpp
|
main.cpp
|
||||||
|
$<TARGET_OBJECTS:libolive-editor>
|
||||||
)
|
)
|
||||||
|
|
||||||
# Create docs if doxygen was found
|
# Create docs if doxygen was found
|
||||||
@@ -83,17 +84,16 @@ elseif(APPLE)
|
|||||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/packaging/macos/MacOSXBundleInfo.plist.in
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/packaging/macos/MacOSXBundleInfo.plist.in
|
||||||
MACOSX_BUNDLE_GUI_IDENTIFIER org.olivevideoeditor.Olive
|
MACOSX_BUNDLE_GUI_IDENTIFIER org.olivevideoeditor.Olive
|
||||||
MACOSX_BUNDLE_ICON_FILE olive.icns
|
MACOSX_BUNDLE_ICON_FILE olive.icns
|
||||||
RESOURCE "${OLIVE_ICON} libolive-editor"
|
RESOURCE "${OLIVE_ICON}"
|
||||||
OUTPUT_NAME "Olive"
|
OUTPUT_NAME "Olive"
|
||||||
)
|
)
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
# Set Linux-specific properties for application
|
# Set Linux-specific properties for application
|
||||||
install(TARGETS olive-editor RUNTIME DESTINATION bin)
|
install(TARGETS olive-editor RUNTIME DESTINATION bin)
|
||||||
install(TARGETS libolive-editor RUNTIME DESTINATION lib)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Set link libraries
|
# Set link libraries
|
||||||
target_link_libraries(olive-editor PRIVATE libolive-editor ${OLIVE_LIBRARIES})
|
target_link_libraries(olive-editor PRIVATE ${OLIVE_LIBRARIES})
|
||||||
target_link_libraries(libolive-editor PRIVATE ${OLIVE_LIBRARIES})
|
target_link_libraries(libolive-editor PRIVATE ${OLIVE_LIBRARIES})
|
||||||
|
|
||||||
# Set compile options
|
# Set compile options
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ function(olive_add_test GROUP NAME SOURCE)
|
|||||||
string(APPEND TEST_FILE_CONTENT "\n${TEST_BODY}")
|
string(APPEND TEST_FILE_CONTENT "\n${TEST_BODY}")
|
||||||
file(WRITE "${OUTPUT_FILE}" "${TEST_FILE_CONTENT}")
|
file(WRITE "${OUTPUT_FILE}" "${TEST_FILE_CONTENT}")
|
||||||
|
|
||||||
add_executable(${NAME} ${OUTPUT_FILE})
|
add_executable(${NAME} ${OUTPUT_FILE} $<TARGET_OBJECTS:libolive-editor>)
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
${NAME}
|
${NAME}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
@@ -49,7 +49,6 @@ function(olive_add_test GROUP NAME SOURCE)
|
|||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
${NAME}
|
${NAME}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
libolive-editor
|
|
||||||
${OLIVE_LIBRARIES}
|
${OLIVE_LIBRARIES}
|
||||||
)
|
)
|
||||||
target_compile_definitions(
|
target_compile_definitions(
|
||||||
|
|||||||
Reference in New Issue
Block a user