3 Commits

Author SHA1 Message Date
d9e0931a4d Update CMakeLists.txt 2024-05-21 13:40:35 -04:00
576d51ac68 Windows main statement 2024-05-13 21:09:21 -04:00
ccf9edee93 Update CMakeLists.txt
Version downgrade
2024-02-24 07:46:40 -05:00
3 changed files with 19 additions and 9 deletions

2
.gitignore vendored Normal file
View File

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

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.27)
cmake_minimum_required(VERSION 3.18)
project(Event
VERSION 1.0
LANGUAGES CXX
@@ -10,20 +10,19 @@ endif()
set(CMAKE_CXX_STANDARD 20)
if (WIN32)
set(CMAKE_CXX_FLAGS "-municode")
endif()
file(GLOB_RECURSE SOURCES "src/*.cpp")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include_directories("include")
add_library(Event SHARED ${SOURCES}
src/Event.cpp
include/EventConnection.h
src/EventConnection.cpp)
if (UNIX)
add_library(Event SHARED ${SOURCES})
endif()
if (WIN32)
add_library(Event STATIC ${SOURCES})
endif()
set_target_properties(Event PROPERTIES LINKER_LANGUAGE CXX)

View File

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