2 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
3 changed files with 18 additions and 8 deletions

2
.gitignore vendored Normal file
View File

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

View File

@@ -10,20 +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("include") include_directories("include")
add_library(Event SHARED ${SOURCES} if (UNIX)
src/Event.cpp add_library(Event SHARED ${SOURCES})
include/EventConnection.h endif()
src/EventConnection.cpp)
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

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