From 641d4c9b40a0951f79c75614bd626c2c84e1c9ec Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Thu, 9 Apr 2020 21:07:49 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=BA=D0=BB=D1=8E=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B1=D0=B8=D0=B1=D0=BB=D0=B8=D0=BE?= =?UTF-8?q?=D1=82=D0=B5=D0=BA=D0=B8=20CMLib?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 20 ++++++++++++++++++++ cmake/etc/Variables.cmake | 28 ++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 cmake/etc/Variables.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..f97dd97 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,20 @@ +# Минимальная версия CMake +cmake_minimum_required(VERSION 3.3) + +# Предпочтительно следовать стандартам принятым в указанном диапазоне версий +cmake_policy(VERSION 3.0.2..3.7) + +# Название и версия проекта и используемые языки программирования +project(cmlib-example-library VERSION 0.2.0 LANGUAGES C CXX) + +# В каталоге cmake/cmlib находятся файлы с библиотечными функциями +if(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/cmake/cmlib) + list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/cmlib) +else() + message(FATAL_ERROR "CMake library directory does not exist") +endif() +list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/find) + +include(CMLibCommon) + + diff --git a/cmake/etc/Variables.cmake b/cmake/etc/Variables.cmake new file mode 100644 index 0000000..8fb2553 --- /dev/null +++ b/cmake/etc/Variables.cmake @@ -0,0 +1,28 @@ +set(ORGANIZATION_NAME "org") +set(AUTHOR_NAME "John Doe") + +set(DOXYGEN_PROJECT_TITLE "Пример проекта для библиотеки") +set(DOXYGEN_GENERATE_LATEX YES) +set(DOXYGEN_GENERATE_HTML YES) + +set(CPACK_GENERATOR "TXZ;DEB") +set(CPACK_PACKAGE_CONTACT "John Doe ") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake library project example") +set(CPACK_DEBIAN_PACKAGE_SECTION "misc") +set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") +set(CPACK_SOURCE_IGNORE_FILES + ${CMAKE_BINARY_DIR} + .git/ + .git$ + .gitlab-ci/ + _output/ + files/lib + files/log + .clang-tidy + .cmake-format + .gitignore + .gitmodules + .gitlab-ci.yml + CMakeLists.txt.user.* + ~$ + \\\\..*\\\\.swp$)