summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorThomas Braun <thomas.braun@byte-physics.de>2016-07-27 18:00:40 (GMT)
committerThomas Braun <thomas.braun@byte-physics.de>2016-07-27 18:04:02 (GMT)
commit6b80cc4181dc73a061b049e3283e6e2d8a4e5346 (patch)
tree8a0e1fe487609fd94aaecd5726d5c0e894b0eb50 /cmake
parentff7d28bd0ea7538d4a9c65facd0b5ca057f867d8 (diff)
downloadDoxygen-6b80cc4181dc73a061b049e3283e6e2d8a4e5346.zip
Doxygen-6b80cc4181dc73a061b049e3283e6e2d8a4e5346.tar.gz
Doxygen-6b80cc4181dc73a061b049e3283e6e2d8a4e5346.tar.bz2
CMAKE: Fix building on Windows with VS 2015
See https://msdn.microsoft.com/library/bb531344.aspx. Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindIconv.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/FindIconv.cmake b/cmake/FindIconv.cmake
index d96e3c0..a30f1fd 100644
--- a/cmake/FindIconv.cmake
+++ b/cmake/FindIconv.cmake
@@ -71,6 +71,11 @@ endif()
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY})
+
+if(MSVC_VERSION GREATER 1800)
+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} legacy_stdio_definitions.lib)
+endif()
+
check_cxx_source_compiles(
"#include <iconv.h>
int main() {
@@ -91,6 +96,10 @@ if(ICONV_FOUND)
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
+ if(MSVC_VERSION GREATER 1800)
+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} legacy_stdio_definitions.lib)
+ endif()
+
if (NOT DEFINED ICONV_ACCEPTS_NONCONST_INPUT)
# Display a useful message first time we come through here
message(STATUS "One (and only one) of the ICONV_ACCEPTS_... tests must pass")