# HG changeset patch # User jodogne # Date 1380110461 -7200 # Node ID 86c5bb651bfa9ee8d15eef32923701872207de4c # Parent 701d748cf3271c7df9e9e6bcede12b9c317fb928 fix diff -r 701d748cf327 -r 86c5bb651bfa CMakeLists.txt --- a/CMakeLists.txt Wed Sep 25 13:18:19 2013 +0200 +++ b/CMakeLists.txt Wed Sep 25 14:01:01 2013 +0200 @@ -280,8 +280,9 @@ message(FATAL_ERROR "Support your platform here") endif() else() - set(ORTHANC_CPP_CLIENT_AUX ${OPENSSL_SOURCES}) + # Nothing to do if using Visual Studio endif() + else() set(ORTHANC_CPP_CLIENT_AUX ${OPENSSL_SOURCES}) endif() @@ -316,13 +317,12 @@ target_link_libraries(OrthancClient pthread) elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + target_link_libraries(OrthancClient OpenSSL ws2_32) + if (CMAKE_CROSSCOMPILING) - target_link_libraries(OrthancClient OpenSSL ws2_32) set_target_properties(OrthancClient PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++" ) - else() - message(FATAL_ERROR "Support Visual Studio here") endif() else() diff -r 701d748cf327 -r 86c5bb651bfa Core/Toolbox.cpp --- a/Core/Toolbox.cpp Wed Sep 25 13:18:19 2013 +0200 +++ b/Core/Toolbox.cpp Wed Sep 25 14:01:01 2013 +0200 @@ -68,16 +68,16 @@ #include "../Resources/sha1/sha1.h" -#ifdef _MSC_VER -// Patch for the missing "_strtoll" symbol when compiling with Visual Studio -extern "C" -{ -int64_t _strtoi64(const char *nptr, char **endptr, int base); -int64_t strtoll(const char *nptr, char **endptr, int base) -{ - return _strtoi64(nptr, endptr, base); -} -} +#ifdef _MSC_VER +// Patch for the missing "_strtoll" symbol when compiling with Visual Studio +extern "C" +{ +int64_t _strtoi64(const char *nptr, char **endptr, int base); +int64_t strtoll(const char *nptr, char **endptr, int base) +{ + return _strtoi64(nptr, endptr, base); +} +} #endif