mirror of
https://github.com/monero-project/monero.git
synced 2025-01-28 18:56:31 +02:00
fix build for msvc 2013
still needs a pre-built libunbound.dll through msys/mingw
This commit is contained in:
parent
6f65ab1904
commit
e186e702aa
@ -115,6 +115,7 @@ include_directories(${UNBOUND_INCLUDE})
|
|||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
add_definitions("/bigobj /MP /W3 /GS- /D_CRT_SECURE_NO_WARNINGS /wd4996 /wd4345 /D_WIN32_WINNT=0x0600 /DWIN32_LEAN_AND_MEAN /DGTEST_HAS_TR1_TUPLE=0 /FIinline_c.h /D__SSE4_1__")
|
add_definitions("/bigobj /MP /W3 /GS- /D_CRT_SECURE_NO_WARNINGS /wd4996 /wd4345 /D_WIN32_WINNT=0x0600 /DWIN32_LEAN_AND_MEAN /DGTEST_HAS_TR1_TUPLE=0 /FIinline_c.h /D__SSE4_1__")
|
||||||
|
add_definitions("/DMINIUPNP_STATICLIB")
|
||||||
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Dinline=__inline")
|
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Dinline=__inline")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:10485760")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:10485760")
|
||||||
if(STATIC)
|
if(STATIC)
|
||||||
|
@ -27,14 +27,24 @@
|
|||||||
|
|
||||||
MESSAGE(STATUS "Looking for libunbound")
|
MESSAGE(STATUS "Looking for libunbound")
|
||||||
|
|
||||||
FIND_PATH(UNBOUND_INCLUDE_DIR
|
if(MSVC)
|
||||||
NAMES unbound.h
|
# MSVC build: check for pre-compiled library at most probable location
|
||||||
PATH_SUFFIXES include/ include/unbound/
|
set(UNBOUND_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/external/unbound/libunbound)
|
||||||
PATHS "${PROJECT_SOURCE_DIR}"
|
set(UNBOUND_LIBRARIES ${PROJECT_SOURCE_DIR}/external/unbound/.libs/libunbound.dll.a)
|
||||||
${UNBOUND_ROOT}
|
if(NOT EXISTS ${UNBOUND_LIBRARIES})
|
||||||
$ENV{UNBOUND_ROOT}
|
message(FATAL_ERROR "libunbound library not found")
|
||||||
/usr/local/
|
endif()
|
||||||
/usr/
|
|
||||||
)
|
|
||||||
|
|
||||||
find_library(UNBOUND_LIBRARIES unbound)
|
else()
|
||||||
|
FIND_PATH(UNBOUND_INCLUDE_DIR
|
||||||
|
NAMES unbound.h
|
||||||
|
PATH_SUFFIXES include/ include/unbound/
|
||||||
|
PATHS "${PROJECT_SOURCE_DIR}"
|
||||||
|
${UNBOUND_ROOT}
|
||||||
|
$ENV{UNBOUND_ROOT}
|
||||||
|
/usr/local/
|
||||||
|
/usr/
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(UNBOUND_LIBRARIES unbound)
|
||||||
|
endif()
|
||||||
|
@ -112,13 +112,6 @@ namespace nodetool
|
|||||||
size_t get_outgoing_connections_count();
|
size_t get_outgoing_connections_count();
|
||||||
peerlist_manager& get_peerlist_manager(){return m_peerlist;}
|
peerlist_manager& get_peerlist_manager(){return m_peerlist;}
|
||||||
private:
|
private:
|
||||||
const std::vector<std::string> m_seed_nodes_list =
|
|
||||||
{ "seeds.moneroseeds.se"
|
|
||||||
, "seeds.moneroseeds.ae.org"
|
|
||||||
, "seeds.moneroseeds.ch"
|
|
||||||
, "seeds.moneroseeds.li"
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef COMMAND_REQUEST_STAT_INFO_T<typename t_payload_net_handler::stat_info> COMMAND_REQUEST_STAT_INFO;
|
typedef COMMAND_REQUEST_STAT_INFO_T<typename t_payload_net_handler::stat_info> COMMAND_REQUEST_STAT_INFO;
|
||||||
|
|
||||||
CHAIN_LEVIN_INVOKE_MAP2(p2p_connection_context); //move levin_commands_handler interface invoke(...) callbacks into invoke map
|
CHAIN_LEVIN_INVOKE_MAP2(p2p_connection_context); //move levin_commands_handler interface invoke(...) callbacks into invoke map
|
||||||
|
@ -240,6 +240,13 @@ namespace nodetool
|
|||||||
template<class t_payload_net_handler>
|
template<class t_payload_net_handler>
|
||||||
bool node_server<t_payload_net_handler>::init(const boost::program_options::variables_map& vm, bool testnet)
|
bool node_server<t_payload_net_handler>::init(const boost::program_options::variables_map& vm, bool testnet)
|
||||||
{
|
{
|
||||||
|
const std::vector<std::string> m_seed_nodes_list =
|
||||||
|
{ "seeds.moneroseeds.se"
|
||||||
|
, "seeds.moneroseeds.ae.org"
|
||||||
|
, "seeds.moneroseeds.ch"
|
||||||
|
, "seeds.moneroseeds.li"
|
||||||
|
};
|
||||||
|
|
||||||
if (testnet)
|
if (testnet)
|
||||||
{
|
{
|
||||||
append_net_address(m_seed_nodes, "107.152.187.202:28080");
|
append_net_address(m_seed_nodes, "107.152.187.202:28080");
|
||||||
|
@ -5,6 +5,13 @@
|
|||||||
# ctest. You can select which tests to run using 'ctest -R regex'.
|
# ctest. You can select which tests to run using 'ctest -R regex'.
|
||||||
# For more options, run 'ctest --help'.
|
# For more options, run 'ctest --help'.
|
||||||
|
|
||||||
|
# Modification for Monero/MSVC: force gtest.lib to use static/dynamic settings from root
|
||||||
|
if(MSVC)
|
||||||
|
if(NOT STATIC)
|
||||||
|
set(BUILD_SHARED_LIBS ON)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to
|
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to
|
||||||
# make it prominent in the GUI.
|
# make it prominent in the GUI.
|
||||||
option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
|
option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
|
||||||
|
@ -188,7 +188,9 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#if !defined(_MSC_VER)
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
#ifndef _WIN32_WCE
|
#ifndef _WIN32_WCE
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
# include <sys/stat.h>
|
# include <sys/stat.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user