提交 e9986aa1 编写于 作者: Z zdenop

cmake: fix build on windows

上级 f38e7a7b
......@@ -154,7 +154,9 @@ if (OPENMP_BUILD)
if (OpenMP_FOUND)
message(">> ${OpenMP_FOUND} ${OpenMP_VERSION}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
add_library(OpenMP::OpenMP_CXX IMPORTED INTERFACE)
if(${CMAKE_VERSION} VERSION_LESS "3.9.0")
add_library(OpenMP::OpenMP_CXX IMPORTED INTERFACE)
endif()
endif()
# https://stackoverflow.com/questions/12399422/how-to-set-linker-flags-for-openmp-in-cmakes-try-compile-function
if (NOT OpenMP_FOUND AND CLANG AND WIN32)
......@@ -515,7 +517,7 @@ endif()
add_executable (tesseract ${tesseractmain_src} ${tesseractmain_rsc})
target_link_libraries (tesseract libtesseract)
if (HAVE_TIFFIO_H)
target_link_libraries(tesseract tiff)
target_link_libraries(tesseract ${TIFF_LIBRARIES})
endif()
if (OPENMP_BUILD AND UNIX)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册