examples : refactor in order to reuse code and reduce duplication (#482)

* examples : refactor common code into a library

* examples : refactor common SDL code into a library

* make : update Makefile to use common libs

* common : fix MSVC M_PI ..

* addon.node : link common lib
This commit is contained in:
Georgi Gerganov
2023-02-15 19:28:10 +02:00
committed by GitHub
parent 0336161b7d
commit 09d7d2b68e
19 changed files with 580 additions and 1254 deletions

View File

@ -5,6 +5,5 @@ if (WHISPER_SUPPORT_SDL2)
include(DefaultTargetOptions)
target_include_directories(${TARGET} PRIVATE ${SDL2_INCLUDE_DIRS})
target_link_libraries(${TARGET} PRIVATE whisper ${SDL2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(${TARGET} PRIVATE common common-sdl whisper ${CMAKE_THREAD_LIBS_INIT})
endif ()