From f2d0f84fe1e8e22b2fa2e7e16ff59876559aaa70 Mon Sep 17 00:00:00 2001 From: keiradiance Date: Sun, 3 Sep 2023 01:13:54 +0900 Subject: [PATCH] Add cmake configuration --- CMakeLists.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..bc24437 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 2.8) + +project(logc) + +enable_language(C) +add_definitions(-std=c99) + +set(LOGC_SOURCES + src/log.c +) + +include_directories(src) + +add_library(logc_shared SHARED ${LOGC_SOURCES}) + +set(PUBLIC_HEADERS + src/log.h +) + +set_target_properties(logc_shared PROPERTIES + PUBLIC_HEADER "${PUBLIC_HEADERS}" +) + +install(TARGETS logc_shared + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +)