diff --git a/huagao/CMakeLists.txt b/huagao/CMakeLists.txt index d4e6aa22..29733e33 100644 --- a/huagao/CMakeLists.txt +++ b/huagao/CMakeLists.txt @@ -1,6 +1,14 @@ # CMake 最低版本号要求 cmake_minimum_required (VERSION 2.8) project(huagotwainds) +if (MSVC_VERSION GREATER_EQUAL "1900") + include(CheckCXXCompilerFlag) + CHECK_CXX_COMPILER_FLAG("/std:c++17" _cpp_latest_flag_supported) + if (_cpp_latest_flag_supported) + add_compile_options("/std:c++17") + endif() +endif() + execute_process( COMMAND git log -1 --format=%H WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} @@ -89,7 +97,7 @@ ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows") link_libraries(tesseract_viewer) link_libraries(tesseract_wordrec) link_libraries(turbojpeg) - link_libraries(log4cplusS) + RW_LINK_3RD_PART_LIBRARY(log4cplusS) MESSAGE(STATUS "current platform: Windows") ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") MESSAGE(STATUS "current platform: FreeBSD")