Merge remote-tracking branch 'origin/master'

# Conflicts:
#	CMakeLists.txt
This commit is contained in:
2024-08-21 13:22:37 -04:00
4 changed files with 21 additions and 8 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/cmake-build-debug
/.idea

View File

@@ -10,18 +10,19 @@ endif()
set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD 20)
if (WIN32)
set(CMAKE_CXX_FLAGS "-municode")
endif()
file(GLOB_RECURSE SOURCES "src/*.cpp") file(GLOB_RECURSE SOURCES "src/*.cpp")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include_directories(${PROJECT_SOURCE_DIR}/include) include_directories("include")
add_library(Event SHARED ${SOURCES}) if (UNIX)
add_library(Event SHARED ${SOURCES})
endif()
if (WIN32)
add_library(Event STATIC ${SOURCES})
endif()
set_target_properties(Event PROPERTIES LINKER_LANGUAGE CXX) set_target_properties(Event PROPERTIES LINKER_LANGUAGE CXX)

View File

@@ -2,13 +2,14 @@
/// @description Templated BasicEvent Hook Class modeled after C# events /// @description Templated BasicEvent Hook Class modeled after C# events
/// @author Josh O'Leary - Redacted Software /// @author Josh O'Leary - Redacted Software
/// @revision 3 /// @revision 3
/// @lastedit 2024-02-21 /// @lastedit 2024-06-01
/// @license Unlicense - Public Domain /// @license Unlicense - Public Domain
#pragma once #pragma once
#include <chrono> #include <chrono>
#include <functional> #include <functional>
#include <memory>
// TODO: ThreadSafeEvent / AsyncEvent version of the class. // TODO: ThreadSafeEvent / AsyncEvent version of the class.
// TODO: ConsumableEvent - a version that can be "consumed" by a callback by returning true. It will be sunk and not passed to further callbacks. // TODO: ConsumableEvent - a version that can be "consumed" by a callback by returning true. It will be sunk and not passed to further callbacks.

View File

@@ -42,3 +42,12 @@ int main() {
return 0; return 0;
} }
#ifdef _WIN32
extern "C" {
int wmain(int argc, wchar_t* argv[]) {
return main();
}
}
#endif