Skip to content

Commit ab21528

Browse files
committed
Simplify Windows VST3 module - use direct file inclusion
Remove the OBJECT library approach and add module_win32.cpp directly to the pluginval sources like on other platforms. The Windows-specific compile definitions (NOMINMAX, WIN32_LEAN_AND_MEAN, etc.) are already set at the target level. https://claude.ai/code/session_01AY9chvBEmsCVjNZSUkNcbw
1 parent 278ea09 commit ab21528

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

CMakeLists.txt

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -141,26 +141,9 @@ if(PLUGINVAL_VST3_VALIDATOR)
141141
set_source_files_properties(${VST3_MODULE_MAC_FILE} PROPERTIES
142142
COMPILE_FLAGS "-fobjc-arc")
143143
elseif(WIN32)
144-
# Create an OBJECT library for the Windows module to compile it with SDK settings
145-
add_library(vst3_module_win32 OBJECT
144+
# Add module_win32.cpp directly - compile definitions are set at target level
145+
list(APPEND VST3ValidatorFiles
146146
${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting/module_win32.cpp)
147-
target_compile_features(vst3_module_win32 PRIVATE cxx_std_17)
148-
# Link to sdk_hosting to get its include directories (via PUBLIC interface)
149-
target_link_libraries(vst3_module_win32 PUBLIC sdk_hosting)
150-
# Add additional include directories needed for module_win32.cpp
151-
target_include_directories(vst3_module_win32 PRIVATE
152-
${vst3sdk_SOURCE_DIR}
153-
${vst3sdk_SOURCE_DIR}/public.sdk/source/vst/hosting)
154-
target_compile_definitions(vst3_module_win32 PRIVATE
155-
NOMINMAX
156-
WIN32_LEAN_AND_MEAN
157-
_UNICODE
158-
UNICODE
159-
_CRT_SECURE_NO_WARNINGS
160-
_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING)
161-
# Set static CRT for the object library
162-
set_property(TARGET vst3_module_win32 PROPERTY
163-
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
164147
endif()
165148

166149
target_sources(pluginval PRIVATE ${VST3ValidatorFiles})
@@ -229,10 +212,9 @@ if (PLUGINVAL_VST3_VALIDATOR)
229212
sdk_hosting
230213
sdk)
231214

232-
# Windows needs additional libraries and the module object library
215+
# Windows needs additional libraries for the module loading code
233216
if(WIN32)
234217
target_link_libraries(pluginval PRIVATE
235-
vst3_module_win32
236218
Ole32
237219
Shell32)
238220
endif()

0 commit comments

Comments
 (0)