mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-24 05:07:54 +08:00
d0268cf166
This caused conflicts with many ports; in particular params.h conflicted with tesseract. crfsuite:/include/cqdb.h crfsuite:/include/crf1d.h crfsuite:/include/crfsuite.h crfsuite:/include/crfsuite.hpp crfsuite:/include/crfsuite_api.hpp crfsuite:/include/crfsuite_internal.h crfsuite:/include/iwa.h crfsuite:/include/logging.h crfsuite:/include/option.h crfsuite:/include/os.h crfsuite:/include/params.h *** crfsuite:/include/quark.h crfsuite:/include/readdata.h crfsuite:/include/rumavl.h crfsuite:/include/vecmath.h
72 lines
1.5 KiB
CMake
72 lines
1.5 KiB
CMake
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
|
|
PROJECT(crfsuite)
|
|
|
|
file(GLOB SOURCE_FILE_CQDB
|
|
"lib/cqdb/src/*.c"
|
|
)
|
|
file(GLOB HEADERS_FILE_CQDB
|
|
"lib/cqdb/include/*.h"
|
|
)
|
|
|
|
file(GLOB SOURCE_FILE_CRF
|
|
"lib/crf/src/*.c"
|
|
)
|
|
file(GLOB HEADERS_FILE_CRF
|
|
"lib/crf/src/*.h"
|
|
)
|
|
file(GLOB SOURCE_FILE_FRONTEND
|
|
"frontend/*.c"
|
|
)
|
|
file(GLOB HEADERS_FILE_FRONTEND
|
|
"frontend/*.h"
|
|
)
|
|
file(GLOB SOURCE_FILE
|
|
"swig/*.cpp"
|
|
"frontend/*.c"
|
|
)
|
|
file(GLOB HEADERS_FILE
|
|
"include/*.h"
|
|
"include/*.hpp"
|
|
"frontend/*.h"
|
|
)
|
|
|
|
find_library(LBFGS_LIBRARY lbfgs)
|
|
|
|
include_directories(lib/cqdb/include/)
|
|
include_directories(include/)
|
|
include_directories(win32/liblbfgs/)
|
|
|
|
add_library(cqdb STATIC ${SOURCE_FILE_CQDB} ${HEADERS_FILE_CQDB})
|
|
add_library(crf STATIC ${SOURCE_FILE_CRF} ${HEADERS_FILE_CRF})
|
|
add_library(crfsuite STATIC ${SOURCE_FILE} ${HEADERS_FILE})
|
|
|
|
target_link_libraries(crf PUBLIC cqdb ${LBFGS_LIBRARY})
|
|
target_link_libraries(crfsuite PUBLIC crf)
|
|
|
|
install(TARGETS cqdb crf crfsuite
|
|
RUNTIME DESTINATION bin
|
|
ARCHIVE DESTINATION lib
|
|
LIBRARY DESTINATION lib
|
|
)
|
|
|
|
if (WIN32)
|
|
add_executable(frontend ${SOURCE_FILE_FRONTEND} ${HEADERS_FILE_FRONTEND})
|
|
target_link_libraries(frontend PUBLIC crf)
|
|
install(TARGETS frontend
|
|
RUNTIME DESTINATION tools
|
|
ARCHIVE DESTINATION lib
|
|
LIBRARY DESTINATION lib
|
|
)
|
|
endif()
|
|
|
|
|
|
install(
|
|
FILES
|
|
${HEADERS_FILE}
|
|
${HEADERS_FILE_CQDB}
|
|
${HEADERS_FILE_CRF}
|
|
${HEADERS_FILE_FRONTEND}
|
|
DESTINATION
|
|
include/crfsuite
|
|
)
|