Skip to content

Commit 16feaa6

Browse files
committed
CMake: Added source file grouping and JUCE module sources
1 parent 96601ee commit 16feaa6

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.15)
22

33
project(pluginval VERSION 0.2.8)
44

5+
# Adds all the module sources so they appear correctly in the IDE
6+
set_property(GLOBAL PROPERTY USE_FOLDERS YES)
7+
option(JUCE_ENABLE_MODULE_SOURCE_GROUPS "Enable Module Source Groups" ON)
8+
59
add_subdirectory(modules/juce)
610

711
if (DEFINED ENV{VST2_SDK_DIR})
@@ -26,14 +30,13 @@ set_target_properties(pluginval PROPERTIES
2630
C_VISIBILITY_PRESET hidden
2731
CXX_VISIBILITY_PRESET hidden)
2832

29-
target_sources(pluginval PRIVATE
33+
set(SourceFiles
3034
Source/CommandLine.h
3135
Source/CrashHandler.h
3236
Source/MainComponent.h
3337
Source/PluginTests.h
3438
Source/TestUtilities.h
3539
Source/Validator.h
36-
3740
Source/CommandLine.cpp
3841
Source/CrashHandler.cpp
3942
Source/Main.cpp
@@ -45,6 +48,9 @@ target_sources(pluginval PRIVATE
4548
Source/TestUtilities.cpp
4649
Source/Validator.cpp)
4750

51+
target_sources(pluginval PRIVATE ${SourceFiles})
52+
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/Source PREFIX Source FILES ${SourceFiles})
53+
4854
if (DEFINED ENV{VST2_SDK_DIR})
4955
target_compile_definitions(pluginval PRIVATE
5056
JUCE_PLUGINHOST_VST=1)
@@ -64,4 +70,4 @@ target_link_libraries(pluginval PRIVATE
6470
juce::juce_audio_devices
6571
juce::juce_audio_processors
6672
juce::juce_audio_utils
67-
juce::juce_recommended_warning_flags)
73+
juce::juce_recommended_warning_flags)

modules/juce

Submodule juce updated from 268ac3d to b26dfad

0 commit comments

Comments
 (0)