From d92ee2fe8f1a089bbc399170fca1198f35e57a1d Mon Sep 17 00:00:00 2001 From: Dawid Drozd Date: Fri, 4 Aug 2017 23:50:35 +0200 Subject: [PATCH] Add CMakeLists --- .gitignore | 2 ++ CMakeLists.txt | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 CMakeLists.txt diff --git a/.gitignore b/.gitignore index b8bd026..ddb4c89 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,5 @@ *.exe *.out *.app + +build/ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..917471a --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,26 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.6 FATAL_ERROR) + +# BUILD_SHARED_LIBS can controll build type! +PROJECT(EventBus + VERSION 1.0.12 + LANGUAGES CXX + ) + +ADD_LIBRARY(EventBus + src/EventCollector.cpp src/EventCollector.h + src/Notification.cpp src/Notification.h + src/Notifier.h + ) +ADD_LIBRARY(Dexode::EventBus ALIAS EventBus) + +TARGET_INCLUDE_DIRECTORIES(EventBus PUBLIC src/) + +TARGET_COMPILE_OPTIONS(EventBus + PUBLIC $<$:-std=c++14> + PRIVATE -Wall -pedantic -Wno-unused-private-field -Wnon-virtual-dtor -Werror + ) + +TARGET_COMPILE_FEATURES(EventBus + PUBLIC cxx_auto_type cxx_variadic_templates + ) +