mirror of
https://github.com/gelldur/EventBus.git
synced 2024-12-26 18:51:02 +08:00
Improve library as standalone
This commit is contained in:
parent
0d890ce99f
commit
0514ffd2db
@ -2,18 +2,22 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.6 FATAL_ERROR)
|
||||
|
||||
# BUILD_SHARED_LIBS can controll build type!
|
||||
PROJECT(EventBus
|
||||
VERSION 1.0.12
|
||||
VERSION 1.1.0
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
ADD_LIBRARY(EventBus
|
||||
src/eventbus/EventCollector.cpp src/eventbus/EventCollector.h
|
||||
src/eventbus/Notification.cpp src/eventbus/Notification.h
|
||||
src/eventbus/Notifier.h
|
||||
src/eventbus/EventCollector.cpp include/eventbus/EventCollector.h
|
||||
src/eventbus/Notification.cpp include/eventbus/Notification.h
|
||||
include/eventbus/Notifier.h
|
||||
)
|
||||
ADD_LIBRARY(Dexode::EventBus ALIAS EventBus)
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(EventBus PUBLIC src/)
|
||||
TARGET_INCLUDE_DIRECTORIES(EventBus PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/>
|
||||
$<INSTALL_INTERFACE:include/>
|
||||
PRIVATE src/
|
||||
)
|
||||
|
||||
TARGET_COMPILE_OPTIONS(EventBus
|
||||
PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-std=c++14>
|
||||
@ -24,3 +28,15 @@ TARGET_COMPILE_FEATURES(EventBus
|
||||
PUBLIC cxx_auto_type cxx_variadic_templates
|
||||
)
|
||||
|
||||
INSTALL(TARGETS EventBus EXPORT EventBusConfig
|
||||
ARCHIVE DESTINATION lib/
|
||||
LIBRARY DESTINATION lib/
|
||||
RUNTIME DESTINATION bin/
|
||||
INCLUDES DESTINATION include/
|
||||
)
|
||||
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION include/ FILES_MATCHING PATTERN "*.h*")
|
||||
INSTALL(EXPORT EventBusConfig
|
||||
DESTINATION cmake/
|
||||
NAMESPACE Dexode::
|
||||
)
|
||||
EXPORT(TARGETS EventBus FILE EventBusConfig.cmake)
|
||||
|
@ -1,2 +1,8 @@
|
||||
# EventBus
|
||||
Simple and very fast event bus
|
||||
|
||||
# Thanks to
|
||||
|
||||
- stanislawkabacinski for fixing windows ;) [53d5026](https://github.com/gelldur/EventBus/commit/53d5026cad24810e82cd8d4a43d58cbfe329c502)
|
||||
- kuhar for his advice and suggestions for EventBus
|
||||
- ruslo for this great example: https://github.com/forexample/package-example
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
#include <functional>
|
||||
|
||||
namespace Dexode
|
||||
{
|
@ -1,12 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "Notification.h"
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "Notification.h"
|
||||
|
||||
namespace Dexode
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
// Created by Dawid Drozd aka Gelldur on 18/10/16.
|
||||
//
|
||||
|
||||
#include "EventCollector.h"
|
||||
#include <eventbus/EventCollector.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@ -2,6 +2,6 @@
|
||||
// Created by Dawid Drozd aka Gelldur on 9/4/16.
|
||||
//
|
||||
|
||||
#include "Notification.h"
|
||||
#include <eventbus/Notification.h>
|
||||
|
||||
int Dexode::_::_BaseNotification::_idGenerator = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user