mirror of http://192.168.1.51:8099/lmh188/twain3.0
修复CMakeLists中生成vs工程需要调整c++版本以及debug版本log库链接错误
This commit is contained in:
parent
9c02a0c0f0
commit
97522c024b
|
@ -1,6 +1,14 @@
|
||||||
# CMake 最低版本号要求
|
# CMake 最低版本号要求
|
||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 2.8)
|
||||||
project(huagotwainds)
|
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(
|
execute_process(
|
||||||
COMMAND git log -1 --format=%H
|
COMMAND git log -1 --format=%H
|
||||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
|
@ -89,7 +97,7 @@ ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||||
link_libraries(tesseract_viewer)
|
link_libraries(tesseract_viewer)
|
||||||
link_libraries(tesseract_wordrec)
|
link_libraries(tesseract_wordrec)
|
||||||
link_libraries(turbojpeg)
|
link_libraries(turbojpeg)
|
||||||
link_libraries(log4cplusS)
|
RW_LINK_3RD_PART_LIBRARY(log4cplusS)
|
||||||
MESSAGE(STATUS "current platform: Windows")
|
MESSAGE(STATUS "current platform: Windows")
|
||||||
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||||
MESSAGE(STATUS "current platform: FreeBSD")
|
MESSAGE(STATUS "current platform: FreeBSD")
|
||||||
|
|
Loading…
Reference in New Issue