From f62fa83dedbeb1b216791409aee063ae9b80e869 Mon Sep 17 00:00:00 2001 From: avinal <185067@nith.ac.in> Date: Sun, 7 Feb 2021 17:14:15 +0530 Subject: [PATCH] build script complted --- CMakeLists.txt | 24 ++++++++++++++++++++++++ build.sh | 15 +++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 build.sh diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..bef838c --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.1) + +set(PROJECT_NAME RCRS) +file(GLOB SOURCES src/*.cpp) + +project(${PROJECT_NAME} VERSION 0.1) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(SQLITECPP_RUN_CPPCHECK OFF CACHE BOOL "" FORCE) +set(SQLITECPP_RUN_CPPLINT OFF CACHE BOOL "" FORCE) + +add_subdirectory(SQLiteCpp) + +add_executable(${PROJECT_NAME} ${SOURCES}) + +target_include_directories(${PROJECT_NAME} PRIVATE SQLiteCpp/include PUBLIC include) +target_link_libraries(${PROJECT_NAME} + SQLiteCpp + sqlite3 + pthread + dl + ) \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..874949d --- /dev/null +++ b/build.sh @@ -0,0 +1,15 @@ +#! /bin/sh + +set -e + +if [ -d "build" ] +then + cd build +else + mkdir build + cd build +fi + +cmake -DCMAKE_BUILD_TYPE=Debug .. + +cmake --build . \ No newline at end of file