提交 46cadaea 编写于 作者: L liaogang

Update external dependencies cmake

上级 4b94494a
......@@ -70,6 +70,7 @@ IF(NOT ${NUMPY_FOUND})
FIND_PATH(PYTHON_NUMPY_INCLUDE_DIR numpy/arrayobject.h
HINTS "${NUMPY_PATH}" "${PYTHON_INCLUDE_PATH}")
INCLUDE_DIRECTORIES(${PYTHON_NUMPY_INCLUDE_DIR})
ENDIF()
INCLUDE_DIRECTORIES(${PYTHON_NUMPY_INCLUDE_DIR})
......@@ -22,7 +22,7 @@ ExternalProject_Add(
PREFIX ${PROTOBUF_SOURCES_DIR}
DEPENDS zlib
GIT_REPOSITORY "https://github.com/google/protobuf.git"
GIT_TAG "v3.0.0"
# GIT_TAG "v3.1.0"
CONFIGURE_COMMAND
${CMAKE_COMMAND} ${PROTOBUF_SOURCES_DIR}/src/protobuf/cmake
-Dprotobuf_BUILD_TESTS=OFF
......
......@@ -19,8 +19,8 @@ IF((NOT ${PYTHONINTERP_FOUND}) OR (NOT ${PYTHONLIBS_FOUND}))
INCLUDE(ExternalProject)
SET(PYTHON_SOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/python)
SET(PYTHON_INSTALL_DIR ${PROJECT_BINARY_DIR}/python)
SET(PYTHON_SOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/Python)
SET(PYTHON_INSTALL_DIR ${PROJECT_BINARY_DIR}/Python)
IF(MSVC)
LIST(APPEND EXTERNAL_PROJECT_OPTIONAL_ARGS
......@@ -87,6 +87,6 @@ IF((NOT ${PYTHONINTERP_FOUND}) OR (NOT ${PYTHONLIBS_FOUND}))
MESSAGE(FATAL_ERROR "Unknown system !")
ENDIF()
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIR})
ENDIF()
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIR})
......@@ -17,7 +17,7 @@ INCLUDE(ExternalProject)
SET(WARPCTC_SOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/warpctc)
SET(WARPCTC_INSTALL_DIR ${PROJECT_BINARY_DIR}/warpctc)
IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
IF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" )
SET(USE_OMP ON)
ELSE()
SET(USE_OMP OFF)
......@@ -28,8 +28,9 @@ ExternalProject_Add(
GIT_REPOSITORY "https://github.com/gangliao/warp-ctc.git"
PREFIX ${WARPCTC_SOURCES_DIR}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${WARPCTC_INSTALL_DIR}
CMAKE_ARGS -DWITH_GPU=${CUDA_FOUND}
CMAKE_ARGS -DWITH_GPU=${WITH_GPU}
CMAKE_ARGS -DWITH_OMP=${USE_OMP}
UPDATE_COMMAND ""
)
SET(WARPCTC_INCLUDE_DIR "${WARP_INSTALL_DIR}/include" CACHE PATH "Warp-ctc Directory" FORCE)
......@@ -40,7 +41,7 @@ IF(WIN32)
"${WARPCTC_INSTALL_DIR}/lib/warpctc.dll" CACHE FILEPATH "Warp-ctc Library" FORCE)
ELSE(WIN32)
SET(WARPCTC_LIBRARIES
"${WARPCTC_INSTALL_DIR}/lib/libwarpctc.so" CACHE FILEPATH "Warp-ctc Library" FORCE)
"${WARPCTC_INSTALL_DIR}/lib/libwarpctc.dylib" CACHE FILEPATH "Warp-ctc Library" FORCE)
ENDIF(WIN32)
LIST(APPEND external_project_dependencies warpctc)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册