Fixes win_build and VS/cmake build problems
This commit is contained in:
@@ -116,6 +116,7 @@ ELSE (BUILD_PY_LIB)
|
|||||||
add_library(epanet2 SHARED ${EPANET_LIB_ALL})
|
add_library(epanet2 SHARED ${EPANET_LIB_ALL})
|
||||||
else(NOT WIN32)
|
else(NOT WIN32)
|
||||||
add_library(epanet2 SHARED ${EPANET_LIB_ALL} ${PROJECT_SOURCE_DIR}/include/epanet2.def)
|
add_library(epanet2 SHARED ${EPANET_LIB_ALL} ${PROJECT_SOURCE_DIR}/include/epanet2.def)
|
||||||
|
set_source_files_properties(${PROJECT_SOURCE_DIR}/include/epanet2.def PROPERTIES_HEADER_FILE_ONLY TRUE)
|
||||||
endif(NOT WIN32)
|
endif(NOT WIN32)
|
||||||
target_include_directories(epanet2 PUBLIC ${PROJECT_SOURCE_DIR}/include)
|
target_include_directories(epanet2 PUBLIC ${PROJECT_SOURCE_DIR}/include)
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ function in epanet2_2.h.
|
|||||||
#else
|
#else
|
||||||
#define DLLEXPORT __declspec(dllimport) __stdcall
|
#define DLLEXPORT __declspec(dllimport) __stdcall
|
||||||
#endif
|
#endif
|
||||||
#elif defined(CYGWIN)
|
#elif defined(__CYGWIN__)
|
||||||
#define DLLEXPORT __stdcall
|
#define DLLEXPORT __stdcall
|
||||||
#else
|
#else
|
||||||
#define DLLEXPORT
|
#define DLLEXPORT
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
#else
|
#else
|
||||||
#define DLLEXPORT __declspec(dllimport) __stdcall
|
#define DLLEXPORT __declspec(dllimport) __stdcall
|
||||||
#endif
|
#endif
|
||||||
#elif defined(CYGWIN)
|
#elif defined(__CYGWIN__)
|
||||||
#define DLLEXPORT __stdcall
|
#define DLLEXPORT __stdcall
|
||||||
#else
|
#else
|
||||||
#define DLLEXPORT
|
#define DLLEXPORT
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include "enumstxt.h"
|
#include "enumstxt.h"
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef _WIN32
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -19,16 +19,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//*** Need to define WINDOWS to use the getTmpName function ***//
|
//*** For the Windows SDK _tempnam function ***//
|
||||||
// --- define WINDOWS
|
|
||||||
#undef WINDOWS
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define WINDOWS
|
|
||||||
#endif
|
|
||||||
#ifdef __WIN32__
|
|
||||||
#define WINDOWS
|
|
||||||
#endif
|
|
||||||
#ifdef WINDOWS
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -19,9 +19,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef WINDOWS
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define WINDOWS
|
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user