Skip to content

Commit 7c61a4a

Browse files
committed
Add a custom target when not top level
1 parent 2c712ef commit 7c61a4a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,23 @@ if (pluginval_IS_TOP_LEVEL)
1515
# set(CMAKE_OSX_ARCHITECTURES arm64 x86_64)
1616
endif()
1717

18+
else()
19+
option(PLUGINVAL_STRICTNESS_LEVEL "Pluginval --strictness argument" 10)
20+
21+
if(APPLE)
22+
set(PLUGIN_TARGET "${CMAKE_PROJECT_NAME}_AU")
23+
else()
24+
set(PLUGIN_TARGET "${CMAKE_PROJECT_NAME}_VST3")
25+
endif()
26+
27+
add_custom_target(${CMAKE_PROJECT_NAME}_Pluginval
28+
COMMAND
29+
pluginval
30+
--validate ${artefact}
31+
--strictness-level ${PLUGINVAL_STRICTNESS_LEVEL}
32+
DEPENDS ${PLUGIN_TARGET} pluginval
33+
VERBATIM)
34+
1835
endif()
1936

2037
# sanitizer options, from https://github.com/sudara/cmake-includes/blob/main/Sanitizers.cmake

0 commit comments

Comments
 (0)