Browse Source

[win32] use boost filesystem for gcc builds

Signed-off-by: r4sas <r4sas@i2pmail.org>
gha
R4SAS 2 months ago
parent
commit
7c78da1336
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2
  1. 11
      Makefile.mingw
  2. 2
      Win32/Win32NetState.cpp
  3. 2
      Win32/Win32NetState.h
  4. 4
      libi2pd/FS.h

11
Makefile.mingw

@ -7,7 +7,7 @@ CXXFLAGS := $(CXX_DEBUG) -fPIC -msse @@ -7,7 +7,7 @@ CXXFLAGS := $(CXX_DEBUG) -fPIC -msse
INCFLAGS := -I$(DAEMON_SRC_DIR) -IWin32
LDFLAGS := ${LD_DEBUG} -static -fPIC -msse
NEEDED_CXXFLAGS += -std=c++17
NEEDED_CXXFLAGS += -std=c++20
DEFINES += -DWIN32_LEAN_AND_MEAN
# UPNP Support
@ -16,7 +16,12 @@ ifeq ($(USE_UPNP),yes) @@ -16,7 +16,12 @@ ifeq ($(USE_UPNP),yes)
LDLIBS = -lminiupnpc
endif
ifeq ($(USE_WINXP_FLAGS), yes)
DEFINES += -DWINVER=0x0501 -D_WIN32_WINNT=0x0501
endif
LDLIBS += \
$(MINGW_PREFIX)/lib/libboost_filesystem-mt.a \
$(MINGW_PREFIX)/lib/libboost_program_options-mt.a \
$(MINGW_PREFIX)/lib/libssl.a \
$(MINGW_PREFIX)/lib/libcrypto.a \
@ -37,10 +42,6 @@ ifeq ($(USE_WIN32_APP), yes) @@ -37,10 +42,6 @@ ifeq ($(USE_WIN32_APP), yes)
DAEMON_OBJS += $(patsubst %.rc,obj/%.o,$(DAEMON_RC))
endif
ifeq ($(USE_WINXP_FLAGS), yes)
DEFINES += -DWINVER=0x0501 -D_WIN32_WINNT=0x0501
endif
ifeq ($(USE_AESNI),yes)
NEEDED_CXXFLAGS += -maes
LDFLAGS += -maes

2
Win32/Win32NetState.cpp

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2020, The PurpleI2P Project
* Copyright (c) 2013-2024, The PurpleI2P Project
*
* This file is part of Purple i2pd project and licensed under BSD3
*

2
Win32/Win32NetState.h

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2020, The PurpleI2P Project
* Copyright (c) 2013-2024, The PurpleI2P Project
*
* This file is part of Purple i2pd project and licensed under BSD3
*

4
libi2pd/FS.h

@ -16,7 +16,9 @@ @@ -16,7 +16,9 @@
#include <functional>
#ifndef STD_FILESYSTEM
# if (!TARGET_OS_SIMULATOR && __has_include(<filesystem>)) // supports std::filesystem
# if (_WIN32 && __GNUG__) // MinGW GCC somehow incorrectly converts paths
# define STD_FILESYSTEM 0
# elif (!TARGET_OS_SIMULATOR && __has_include(<filesystem>)) // supports std::filesystem
# define STD_FILESYSTEM 1
# else
# define STD_FILESYSTEM 0

Loading…
Cancel
Save