diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index bd74573ed..a732ffe59 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -93,26 +93,11 @@ endif()
if(UNIX AND NOT APPLE)
install(TARGETS ${OLIVE_TARGET} RUNTIME DESTINATION bin)
install(FILES ${OLIVE_EFFECTS} DESTINATION share/olive-editor/effects)
- install(FILES packaging/linux/org.olivevideoeditor.Olive.desktop DESTINATION share/applications)
- install(FILES packaging/linux/org.olivevideoeditor.Olive.appdata.xml DESTINATION share/metainfo)
- install(FILES packaging/linux/org.olivevideoeditor.Olive.xml DESTINATION share/mime/packages)
- install(FILES packaging/linux/icons/16x16/org.olivevideoeditor.Olive.png DESTINATION share/icons/hicolor/16x16/apps)
- install(FILES packaging/linux/icons/32x32/org.olivevideoeditor.Olive.png DESTINATION share/icons/hicolor/32x32/apps)
- install(FILES packaging/linux/icons/48x48/org.olivevideoeditor.Olive.png DESTINATION share/icons/hicolor/48x48/apps)
- install(FILES packaging/linux/icons/64x64/org.olivevideoeditor.Olive.png DESTINATION share/icons/hicolor/64x64/apps)
- install(FILES packaging/linux/icons/128x128/org.olivevideoeditor.Olive.png DESTINATION share/icons/hicolor/128x128/apps)
- install(FILES packaging/linux/icons/256x256/org.olivevideoeditor.Olive.png DESTINATION share/icons/hicolor/256x256/apps)
- install(FILES packaging/linux/icons/512x512/org.olivevideoeditor.Olive.png DESTINATION share/icons/hicolor/512x512/apps)
- install(FILES packaging/linux/icons/16x16/application-vnd.olive-project.png DESTINATION share/icons/hicolor/16x16/mimetypes)
- install(FILES packaging/linux/icons/32x32/application-vnd.olive-project.png DESTINATION share/icons/hicolor/32x32/mimetypes)
- install(FILES packaging/linux/icons/48x48/application-vnd.olive-project.png DESTINATION share/icons/hicolor/48x48/mimetypes)
- install(FILES packaging/linux/icons/64x64/application-vnd.olive-project.png DESTINATION share/icons/hicolor/64x64/mimetypes)
- install(FILES packaging/linux/icons/128x128/application-vnd.olive-project.png DESTINATION share/icons/hicolor/128x128/mimetypes)
- install(FILES packaging/linux/icons/256x256/application-vnd.olive-project.png DESTINATION share/icons/hicolor/256x256/mimetypes)
- install(FILES packaging/linux/icons/512x512/application-vnd.olive-project.png DESTINATION share/icons/hicolor/512x512/mimetypes)
install(FILES ${OLIVE_QM_FILES} DESTINATION share/olive-editor/ts)
endif()
+add_subdirectory(packaging)
+
if(DOXYGEN_FOUND)
set(DOXYGEN_PROJECT_NAME "Olive")
set(DOXYGEN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/docs")
diff --git a/app/packaging/CMakeLists.txt b/app/packaging/CMakeLists.txt
new file mode 100644
index 000000000..776bb311e
--- /dev/null
+++ b/app/packaging/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Olive - Non-Linear Video Editor
+# Copyright (C) 2019 Olive Team
+#
+# 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 .
+
+if(UNIX AND NOT APPLE)
+ add_subdirectory(linux)
+endif()
diff --git a/app/packaging/linux/CMakeLists.txt b/app/packaging/linux/CMakeLists.txt
new file mode 100644
index 000000000..037470651
--- /dev/null
+++ b/app/packaging/linux/CMakeLists.txt
@@ -0,0 +1,51 @@
+# Olive - Non-Linear Video Editor
+# Copyright (C) 2019 Olive Team
+#
+# 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 .
+
+if(GIT_FOUND)
+ set(APPDATA_RELEASE_VERSION ${PROJECT_VERSION}-${GIT_HASH})
+ execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --pretty=%cd --date=short
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ OUTPUT_VARIABLE APPDATA_RELEASE_DATE
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+else()
+ set(APPDATA_RELEASE_VERSION ${PROJECT_VERSION})
+ file(TIMESTAMP "${CMAKE_SOURCE_DIR}/CMakeLists.txt" APPDATA_RELEASE_DATE "%Y-%m-%d")
+endif()
+
+configure_file(
+ org.olivevideoeditor.Olive.appdata.xml.in
+ org.olivevideoeditor.Olive.appdata.xml
+)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.olivevideoeditor.Olive.appdata.xml DESTINATION share/metainfo)
+
+install(FILES org.olivevideoeditor.Olive.desktop DESTINATION share/applications)
+install(FILES org.olivevideoeditor.Olive.xml DESTINATION share/mime/packages)
+
+install(FILES icons/16x16/org.olivevideoeditor.Olive.png DESTINATION share/icons/hicolor/16x16/apps)
+install(FILES icons/32x32/org.olivevideoeditor.Olive.png DESTINATION share/icons/hicolor/32x32/apps)
+install(FILES icons/48x48/org.olivevideoeditor.Olive.png DESTINATION share/icons/hicolor/48x48/apps)
+install(FILES icons/64x64/org.olivevideoeditor.Olive.png DESTINATION share/icons/hicolor/64x64/apps)
+install(FILES icons/128x128/org.olivevideoeditor.Olive.png DESTINATION share/icons/hicolor/128x128/apps)
+install(FILES icons/256x256/org.olivevideoeditor.Olive.png DESTINATION share/icons/hicolor/256x256/apps)
+install(FILES icons/512x512/org.olivevideoeditor.Olive.png DESTINATION share/icons/hicolor/512x512/apps)
+install(FILES icons/16x16/application-vnd.olive-project.png DESTINATION share/icons/hicolor/16x16/mimetypes)
+install(FILES icons/32x32/application-vnd.olive-project.png DESTINATION share/icons/hicolor/32x32/mimetypes)
+install(FILES icons/48x48/application-vnd.olive-project.png DESTINATION share/icons/hicolor/48x48/mimetypes)
+install(FILES icons/64x64/application-vnd.olive-project.png DESTINATION share/icons/hicolor/64x64/mimetypes)
+install(FILES icons/128x128/application-vnd.olive-project.png DESTINATION share/icons/hicolor/128x128/mimetypes)
+install(FILES icons/256x256/application-vnd.olive-project.png DESTINATION share/icons/hicolor/256x256/mimetypes)
+install(FILES icons/512x512/application-vnd.olive-project.png DESTINATION share/icons/hicolor/512x512/mimetypes)
diff --git a/app/packaging/linux/org.olivevideoeditor.Olive.appdata.xml b/app/packaging/linux/org.olivevideoeditor.Olive.appdata.xml.in
similarity index 95%
rename from app/packaging/linux/org.olivevideoeditor.Olive.appdata.xml
rename to app/packaging/linux/org.olivevideoeditor.Olive.appdata.xml.in
index e8a508b2d..b09bfdd2f 100644
--- a/app/packaging/linux/org.olivevideoeditor.Olive.appdata.xml
+++ b/app/packaging/linux/org.olivevideoeditor.Olive.appdata.xml.in
@@ -29,9 +29,8 @@
https://olivevideoeditor.org/img/screenshot.1600.jpg
-
+
-
-
+