diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/libsonic/CMakeLists.txt | |
Diffstat (limited to 'vcpkg/ports/libsonic/CMakeLists.txt')
| -rw-r--r-- | vcpkg/ports/libsonic/CMakeLists.txt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/vcpkg/ports/libsonic/CMakeLists.txt b/vcpkg/ports/libsonic/CMakeLists.txt new file mode 100644 index 0000000..d89ece2 --- /dev/null +++ b/vcpkg/ports/libsonic/CMakeLists.txt @@ -0,0 +1,34 @@ +cmake_minimum_required(VERSION 3.8) +project(sonic + VERSION 0.2.0 + LANGUAGES C +) + +option(BUILD_TOOL "Build sonic tool" ON) + +add_library(libsonic sonic.c) +set_target_properties(libsonic + PROPERTIES + PUBLIC_HEADER "${CMAKE_SOURCE_DIR}/sonic.h" + SOVERSION ${PROJECT_VERSION_MAJOR} + VERSION ${CMAKE_PROJECT_VERSION} + OUTPUT_NAME sonic +) + +install(TARGETS libsonic + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + PUBLIC_HEADER DESTINATION include +) + +if (BUILD_TOOL) + add_executable(sonic wave.c main.c) + target_link_libraries(sonic + PRIVATE + libsonic + ) + + install(TARGETS sonic + RUNTIME DESTINATION bin + ) +endif() |