Skip to content

Commit bfad651

Browse files
committed
Group source and header files for QtCreator IDE
1 parent 2cfa7bb commit bfad651

File tree

2 files changed

+44
-32
lines changed

2 files changed

+44
-32
lines changed

plugins/CMakeLists.txt

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
add_library(plugins-common STATIC EXCLUDE_FROM_ALL
2-
"common/plugin/RMSFollower.h"
3-
"common/plugin/MessageUtils.h"
4-
"common/plugin/MessageUtils.cpp"
5-
"common/plugin/InstrumentDescription.h"
6-
"common/plugin/InstrumentDescription.cpp"
7-
"common/plugin/NativeHelpers.h"
8-
"common/plugin/NativeHelpers.cpp"
9-
"common/plugin/SfizzFileScan.h"
10-
"common/plugin/SfizzFileScan.cpp"
11-
"common/plugin/FileTrie.h"
12-
"common/plugin/FileTrie.cpp"
13-
"common/plugin/SfizzForeignPaths.h"
14-
"common/plugin/SfizzForeignPaths.cpp"
15-
"common/plugin/SfizzSettings.h"
16-
"common/plugin/SfizzSettings.cpp")
1+
set(PLUGINSCOMMON_SOURCES
2+
common/plugin/RMSFollower.h
3+
common/plugin/MessageUtils.h
4+
common/plugin/MessageUtils.cpp
5+
common/plugin/InstrumentDescription.h
6+
common/plugin/InstrumentDescription.cpp
7+
common/plugin/NativeHelpers.h
8+
common/plugin/NativeHelpers.cpp
9+
common/plugin/SfizzFileScan.h
10+
common/plugin/SfizzFileScan.cpp
11+
common/plugin/FileTrie.h
12+
common/plugin/FileTrie.cpp
13+
common/plugin/SfizzForeignPaths.h
14+
common/plugin/SfizzForeignPaths.cpp
15+
common/plugin/SfizzSettings.h
16+
common/plugin/SfizzSettings.cpp
17+
)
18+
source_group("Sources" FILES ${PLUGINSCOMMON_SOURCES})
19+
add_library(plugins-common STATIC EXCLUDE_FROM_ALL ${PLUGINSCOMMON_SOURCES})
20+
1721
if(APPLE)
1822
target_sources(plugins-common PRIVATE
1923
"common/plugin/SfizzForeignPaths.mm"

plugins/editor/CMakeLists.txt

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ endif()
88

99
include("cmake/Vstgui.cmake")
1010

11+
set(EDITOR_THEMES
12+
resources/Themes/Default/theme.xml
13+
resources/Themes/Dark/theme.xml
14+
)
1115
set(EDITOR_RESOURCES
1216
logo.png
1317
logo_orange.png
@@ -33,10 +37,6 @@ set(EDITOR_RESOURCES
3337
Themes/Dark/theme.xml
3438
PARENT_SCOPE
3539
)
36-
set(UI_RESOURCES
37-
resources/Themes/Default/theme.xml
38-
resources/Themes/Dark/theme.xml
39-
)
4040
function(copy_editor_resources TARGET SOURCE_DIR DESTINATION_DIR)
4141
set(_deps)
4242
foreach(res ${EDITOR_RESOURCES})
@@ -53,12 +53,9 @@ function(copy_editor_resources TARGET SOURCE_DIR DESTINATION_DIR)
5353
add_dependencies("${TARGET}" "${TARGET}_editor_resources")
5454
endfunction()
5555

56-
set(UI_FILES layout/main.fl layout/about.fl)
57-
source_group("Editor UI" FILES ${UI_FILES})
58-
source_group("Editor Resources" FILES ${UI_RESOURCES})
59-
6056
# editor
61-
add_library(sfizz_editor STATIC EXCLUDE_FROM_ALL
57+
set(EDITOR_UI_FILES layout/main.fl layout/about.fl)
58+
set(EDITOR_SOURCES
6259
src/editor/EditIds.h
6360
src/editor/EditIds.cpp
6461
src/editor/Editor.h
@@ -90,10 +87,18 @@ add_library(sfizz_editor STATIC EXCLUDE_FROM_ALL
9087
src/editor/layout/about.hpp
9188
src/editor/utility/vstgui_after.h
9289
src/editor/utility/vstgui_before.h
93-
${UI_FILES}
94-
${UI_RESOURCES}
90+
)
91+
source_group("Sources" FILES ${EDITOR_SOURCES})
92+
source_group("Editor UI" FILES ${EDITOR_UI_FILES})
93+
source_group("Editor Themes" FILES ${EDITOR_THEMES})
94+
95+
add_library(sfizz_editor STATIC EXCLUDE_FROM_ALL
96+
${EDITOR_SOURCES}
97+
${EDITOR_THEMES}
98+
${EDITOR_UI_FILES}
9599
)
96100
add_library(sfizz::editor ALIAS sfizz_editor)
101+
97102
target_include_directories(sfizz_editor PUBLIC "src")
98103
target_link_libraries(sfizz_editor PUBLIC sfizz::messaging sfizz::plugins-common)
99104
target_link_libraries(sfizz_editor PRIVATE sfizz::vstgui)
@@ -137,11 +142,14 @@ target_link_libraries(sfizz_editor PRIVATE sfizz::colorspaces sfizz::stb_image
137142

138143
# layout tool
139144
if(NOT CMAKE_CROSSCOMPILING)
140-
add_executable(layout-maker
141-
"tools/layout-maker/sources/layout.h"
142-
"tools/layout-maker/sources/reader.cpp"
143-
"tools/layout-maker/sources/reader.h"
144-
"tools/layout-maker/sources/main.cpp")
145+
set(LAYOUTMAKER_SOURCES
146+
tools/layout-maker/sources/layout.h
147+
tools/layout-maker/sources/reader.cpp
148+
tools/layout-maker/sources/reader.h
149+
tools/layout-maker/sources/main.cpp
150+
)
151+
source_group("Sources" FILES ${LAYOUTMAKER_SOURCES})
152+
add_executable(layout-maker ${LAYOUTMAKER_SOURCES})
145153
target_link_libraries(layout-maker PRIVATE absl::strings)
146154

147155
foreach(_layout main about)

0 commit comments

Comments
 (0)