From 1eb90f4df80009a402875561e74d1547e0a65c92 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Thu, 7 May 2026 20:30:52 +0900 Subject: [PATCH] cmake --- .gitignore | 1 + CMakeLists.txt | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 CMakeLists.txt diff --git a/.gitignore b/.gitignore index 9eca6c8..4a432b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.a *.o +/build diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..f45febc --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.25) +project(dectalkmini) + +file(GLOB_RECURSE SOURCES src/**.c) + +add_library(ppr STATIC ${SOURCES}) +target_include_directories(ppr PUBLIC include) + +if(CMAKE_SYSTEM_NAME STREQUAL "Windows") + target_link_libraries(ppr PUBLIC ws2_32) +else() + target_link_libraries(ppr PUBLIC pthread) +endif()