Display the build ID in puredata
This commit is contained in:
parent
3e4da876b3
commit
a191e9fc75
2 changed files with 11 additions and 2 deletions
|
|
@ -24,7 +24,9 @@ function(copy_puredata_resources TARGET SOURCE_DIR DESTINATION_DIR)
|
|||
endfunction()
|
||||
|
||||
add_pd_external(sfizz_puredata "sfizz_puredata.c")
|
||||
target_compile_definitions(sfizz_puredata PRIVATE "SFIZZ_NUM_CCS=${SFIZZ_NUM_CCS}")
|
||||
target_compile_definitions(sfizz_puredata PRIVATE
|
||||
"SFIZZ_NUM_CCS=${SFIZZ_NUM_CCS}"
|
||||
"SFIZZ_VERSION=\"${CMAKE_PROJECT_VERSION}\"")
|
||||
target_link_libraries(sfizz_puredata PRIVATE sfizz::sfizz)
|
||||
|
||||
set_target_properties(sfizz_puredata PROPERTIES
|
||||
|
|
@ -36,6 +38,9 @@ if(MINGW)
|
|||
PROPERTY LINK_FLAGS " -static")
|
||||
endif()
|
||||
|
||||
# Git build identifier
|
||||
target_link_libraries(sfizz_puredata PRIVATE sfizz-git-build-id)
|
||||
|
||||
# Copy resources
|
||||
copy_puredata_resources(sfizz_puredata
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
// license. You should have receive a LICENSE.md file along with the code.
|
||||
// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz
|
||||
|
||||
#include "GitBuildId.h"
|
||||
#include <m_pd.h>
|
||||
#include <sfizz.h>
|
||||
#include <string.h>
|
||||
|
|
@ -292,7 +293,10 @@ __attribute__((visibility("default")))
|
|||
#endif
|
||||
void sfizz_setup()
|
||||
{
|
||||
post("sfizz external for Puredata");
|
||||
if (GitBuildId[0])
|
||||
post("sfizz external for Puredata, version '%s.%s'", SFIZZ_VERSION, GitBuildId);
|
||||
else
|
||||
post("sfizz external for Puredata, version '%s'", SFIZZ_VERSION);
|
||||
|
||||
cls_sfizz_tilde = class_new(
|
||||
gensym("sfizz~"),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue