Skip to content

Commit

Permalink
added support for Visual Studio 2013 Merge branch 'omnus'
Browse files Browse the repository at this point in the history
  • Loading branch information
satoshinm committed Apr 6, 2017
2 parents 5c054e6 + ac0db8b commit dd86358
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ include_directories(deps/noise)
include_directories(deps/sqlite)
include_directories(deps/tinycthread)

if(MINGW)
if(MINGW OR MSVC)
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH}
"C:/Program Files/CURL/lib" "C:/Program Files (x86)/CURL/lib")
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH}
Expand All @@ -71,7 +71,7 @@ if(UNIX AND NOT EMSCRIPTEN)
${GLFW_LIBRARIES} ${CURL_LIBRARIES})
endif()

if(MINGW)
if(MINGW OR MSVC)
target_link_libraries(craft ws2_32.lib glfw
${GLFW_LIBRARIES} ${CURL_LIBRARIES})
endif()
4 changes: 4 additions & 0 deletions src/auth.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#ifndef _auth_h_
#define _auth_h_

#ifdef _MSC_VER
#define snprintf _snprintf
#endif

int get_access_token(
char *result, int length, char *username, char *identity_token);

Expand Down
4 changes: 4 additions & 0 deletions src/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#define DEFAULT_PORT 4080
#endif

#ifdef _MSC_VER
#define snprintf _snprintf
#endif

void client_enable();
void client_disable();
int get_client_enabled();
Expand Down

0 comments on commit dd86358

Please sign in to comment.