Apply cmake-format
This commit is contained in:
parent
b369622ac6
commit
6efb83f003
114
CMakeLists.txt
114
CMakeLists.txt
|
@ -7,7 +7,8 @@ set(META_APP_NAME "Tag Editor")
|
|||
set(META_APP_CATEGORIES "AudioVideo;Database;")
|
||||
set(META_APP_AUTHOR "Martchus")
|
||||
set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
|
||||
set(META_APP_DESCRIPTION "A tageditor with Qt GUI and command line interface. Supports MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska")
|
||||
set(META_APP_DESCRIPTION
|
||||
"A tageditor with Qt GUI and command line interface. Supports MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska")
|
||||
set(META_GUI_OPTIONAL true)
|
||||
set(META_JS_SRC_DIR renamingutility)
|
||||
set(META_VERSION_MAJOR 3)
|
||||
|
@ -16,34 +17,17 @@ set(META_VERSION_PATCH 3)
|
|||
set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON)
|
||||
|
||||
# add project files
|
||||
set(HEADER_FILES
|
||||
cli/attachmentinfo.h
|
||||
cli/fieldmapping.h
|
||||
cli/helper.h
|
||||
cli/mainfeatures.h
|
||||
application/knownfieldmodel.h
|
||||
)
|
||||
set(HEADER_FILES cli/attachmentinfo.h cli/fieldmapping.h cli/helper.h cli/mainfeatures.h application/knownfieldmodel.h)
|
||||
set(SRC_FILES
|
||||
application/main.cpp
|
||||
cli/attachmentinfo.cpp
|
||||
cli/fieldmapping.cpp
|
||||
cli/helper.cpp
|
||||
cli/mainfeatures.cpp
|
||||
application/knownfieldmodel.cpp
|
||||
)
|
||||
application/knownfieldmodel.cpp)
|
||||
|
||||
set(GUI_HEADER_FILES
|
||||
application/targetlevelmodel.h
|
||||
application/settings.h
|
||||
misc/htmlinfo.h
|
||||
misc/utility.h
|
||||
)
|
||||
set(GUI_SRC_FILES
|
||||
application/targetlevelmodel.cpp
|
||||
application/settings.cpp
|
||||
misc/htmlinfo.cpp
|
||||
misc/utility.cpp
|
||||
)
|
||||
set(GUI_HEADER_FILES application/targetlevelmodel.h application/settings.h misc/htmlinfo.h misc/utility.h)
|
||||
set(GUI_SRC_FILES application/targetlevelmodel.cpp application/settings.cpp misc/htmlinfo.cpp misc/utility.cpp)
|
||||
|
||||
set(WIDGETS_HEADER_FILES
|
||||
gui/entertargetdialog.h
|
||||
|
@ -75,8 +59,7 @@ set(WIDGETS_HEADER_FILES
|
|||
renamingutility/filesystemitemmodel.h
|
||||
renamingutility/filteredfilesystemitemmodel.h
|
||||
renamingutility/renamingengine.h
|
||||
renamingutility/tageditorobject.h
|
||||
)
|
||||
renamingutility/tageditorobject.h)
|
||||
set(WIDGETS_SRC_FILES
|
||||
gui/attachmentsedit.cpp
|
||||
gui/attachmentsmodel.cpp
|
||||
|
@ -108,8 +91,7 @@ set(WIDGETS_SRC_FILES
|
|||
renamingutility/renamingengine.cpp
|
||||
renamingutility/tageditorobject.cpp
|
||||
resources/icons.qrc
|
||||
resources/scripts.qrc
|
||||
)
|
||||
resources/scripts.qrc)
|
||||
set(WIDGETS_UI_FILES
|
||||
gui/id3v2optionpage.ui
|
||||
gui/id3v1optionpage.ui
|
||||
|
@ -129,27 +111,16 @@ set(WIDGETS_UI_FILES
|
|||
gui/editortempoptionpage.ui
|
||||
gui/filelayout.ui
|
||||
gui/tageditorwidget.ui
|
||||
gui/dbquerywidget.ui
|
||||
)
|
||||
gui/dbquerywidget.ui)
|
||||
|
||||
set(TEST_HEADER_FILES
|
||||
)
|
||||
set(TEST_SRC_FILES
|
||||
tests/cli.cpp
|
||||
)
|
||||
set(TEST_HEADER_FILES)
|
||||
set(TEST_SRC_FILES tests/cli.cpp)
|
||||
|
||||
set(TS_FILES
|
||||
translations/${META_PROJECT_NAME}_de_DE.ts
|
||||
translations/${META_PROJECT_NAME}_en_US.ts
|
||||
)
|
||||
set(TS_FILES translations/${META_PROJECT_NAME}_de_DE.ts translations/${META_PROJECT_NAME}_en_US.ts)
|
||||
|
||||
set(ICON_FILES
|
||||
resources/icons/hicolor/scalable/apps/${META_PROJECT_NAME}.svg
|
||||
)
|
||||
set(ICON_FILES resources/icons/hicolor/scalable/apps/${META_PROJECT_NAME}.svg)
|
||||
|
||||
set(DOC_FILES
|
||||
README.md
|
||||
)
|
||||
set(DOC_FILES README.md)
|
||||
|
||||
set(REQUIRED_ICONS
|
||||
window-close
|
||||
|
@ -195,8 +166,7 @@ set(REQUIRED_ICONS
|
|||
tag-delete
|
||||
system-file-manager
|
||||
document-save
|
||||
view-media-lyrics
|
||||
)
|
||||
view-media-lyrics)
|
||||
|
||||
# find c++utilities
|
||||
find_package(c++utilities 4.17.0 REQUIRED)
|
||||
|
@ -204,10 +174,10 @@ use_cpp_utilities()
|
|||
include(BasicConfig)
|
||||
|
||||
# find qtutilities
|
||||
if(WIDGETS_GUI OR QUICK_GUI)
|
||||
if (WIDGETS_GUI OR QUICK_GUI)
|
||||
find_package(qtutilities 5.7.0 REQUIRED)
|
||||
use_qt_utilities()
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
# find tagparser
|
||||
find_package(tagparser 8.1.0 REQUIRED)
|
||||
|
@ -216,46 +186,40 @@ list(APPEND TEST_LIBRARIES ${TAG_PARSER_SHARED_LIB})
|
|||
|
||||
# enable experimental JSON export
|
||||
option(ENABLE_JSON_EXPORT "enable JSON export" OFF)
|
||||
if(ENABLE_JSON_EXPORT)
|
||||
if (ENABLE_JSON_EXPORT)
|
||||
# find reflective-rapidjson
|
||||
find_package(reflective_rapidjson REQUIRED)
|
||||
use_reflective_rapidjson()
|
||||
|
||||
# add additional source files
|
||||
list(APPEND HEADER_FILES
|
||||
cli/json.h
|
||||
)
|
||||
list(APPEND SRC_FILES
|
||||
cli/json.cpp
|
||||
)
|
||||
list(APPEND HEADER_FILES cli/json.h)
|
||||
list(APPEND SRC_FILES cli/json.cpp)
|
||||
|
||||
# add generator invocation
|
||||
include(ReflectionGenerator)
|
||||
add_reflection_generator_invocation(
|
||||
INPUT_FILES
|
||||
cli/json.h
|
||||
GENERATORS
|
||||
json
|
||||
OUTPUT_LISTS
|
||||
HEADER_FILES
|
||||
CLANG_OPTIONS_FROM_TARGETS
|
||||
tageditor
|
||||
)
|
||||
add_reflection_generator_invocation(INPUT_FILES
|
||||
cli/json.h
|
||||
GENERATORS
|
||||
json
|
||||
OUTPUT_LISTS
|
||||
HEADER_FILES
|
||||
CLANG_OPTIONS_FROM_TARGETS
|
||||
tageditor)
|
||||
|
||||
# add compile definitions
|
||||
list(APPEND META_PRIVATE_COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_JSON_EXPORT)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
# add Qt modules which can currently not be detected automatically
|
||||
list(APPEND ADDITIONAL_QT_MODULES Concurrent Network)
|
||||
|
||||
# include modules to apply configuration
|
||||
if(WIDGETS_GUI OR QUICK_GUI)
|
||||
if (WIDGETS_GUI OR QUICK_GUI)
|
||||
include(QtGuiConfig)
|
||||
include(JsProviderConfig)
|
||||
include(WebViewProviderConfig)
|
||||
include(QtConfig)
|
||||
endif()
|
||||
endif ()
|
||||
include(WindowsResources)
|
||||
include(TestTarget)
|
||||
include(AppTarget)
|
||||
|
@ -266,12 +230,10 @@ include(ConfigHeader)
|
|||
add_desktop_file()
|
||||
|
||||
# create custom desktop file for launching the renaming utility separately
|
||||
add_custom_desktop_file(
|
||||
"${META_PROJECT_NAME}-renamingutility"
|
||||
"Renaming utility (${META_APP_NAME})"
|
||||
"Renaming utility (${META_APP_NAME})"
|
||||
"Tool to rename files using its tag information"
|
||||
"${META_APP_CATEGORIES}"
|
||||
"${META_PROJECT_NAME} qt-gui --renaming-utility"
|
||||
"${META_PROJECT_NAME}"
|
||||
)
|
||||
add_custom_desktop_file("${META_PROJECT_NAME}-renamingutility"
|
||||
"Renaming utility (${META_APP_NAME})"
|
||||
"Renaming utility (${META_APP_NAME})"
|
||||
"Tool to rename files using its tag information"
|
||||
"${META_APP_CATEGORIES}"
|
||||
"${META_PROJECT_NAME} qt-gui --renaming-utility"
|
||||
"${META_PROJECT_NAME}")
|
||||
|
|
Loading…
Reference in New Issue