-
Notifications
You must be signed in to change notification settings - Fork 6k
Download, build, install External dependencies via cmake #1017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
8a2ceda
Add externel google's dependencies
gangliao 280994f
Add other extern dependencies
gangliao 6cd4b6e
Update external libs
gangliao 662f174
Refine cmake file names
gangliao 62b55cc
Remove paddle internals
gangliao a02ec8c
Refine CMakeLists
gangliao 4b94494
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
gangliao 46cadae
Update external dependencies cmake
gangliao de3c152
Fix glog check type unmatch
gangliao 0b95671
Add external_project_dependencies for targets
gangliao 338dc3e
Fix external denpendencies build order
gangliao 2ffb6db
Fix warpctc header directory
gangliao aee0857
Clean Travis ci and fix bug
gangliao 8acd1ac
Add extern python interp
gangliao 9e7f2b8
Add system configure
gangliao e2d0e09
Update external dependencies
gangliao 642dc35
clean travis ci
gangliao 572d825
Clean cmake
gangliao b090ce3
Fix conflict with develop
gangliao fc47492
Fix merge conflict bug and glog
gangliao 3ecc63a
Add python in travis ci for paddle version command
gangliao 0407902
Add wheel for paddle version command
gangliao 19dc8df
Update travis ci pip
gangliao d0a5ce2
Clean travis ci
gangliao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| INCLUDE(ExternalProject) | ||
|
|
||
| SET(GFLAGS_SOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/gflags) | ||
| SET(GFLAGS_INSTALL_DIR ${PROJECT_BINARY_DIR}/gflags) | ||
|
|
||
| ExternalProject_Add( | ||
| gflags | ||
| GIT_REPOSITORY "https://github.com/gflags/gflags.git" | ||
| PREFIX ${GFLAGS_SOURCES_DIR} | ||
| CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${GFLAGS_INSTALL_DIR} | ||
| CMAKE_ARGS -DBUILD_TESTING=OFF | ||
| LOG_DOWNLOAD =ON | ||
| UPDATE_COMMAND "" | ||
| ) | ||
|
|
||
| SET(GFLAGS_INCLUDE_DIR "${GFLAGS_INSTALL_DIR}/include" CACHE PATH "gflags include directory." FORCE) | ||
| INCLUDE_DIRECTORIES(${GFLAGS_INCLUDE_DIR}) | ||
|
|
||
| IF(WIN32) | ||
| set(GFLAGS_LIBRARIES "${GFLAGS_INSTALL_DIR}/lib/gflags.lib" CACHE FILEPATH "GFLAGS_LIBRARIES" FORCE) | ||
| ELSE(WIN32) | ||
| set(GFLAGS_LIBRARIES "${GFLAGS_INSTALL_DIR}/lib/libgflags.a" CACHE FILEPATH "GFLAGS_LIBRARIES" FORCE) | ||
| ENDIF(WIN32) | ||
|
|
||
| LIST(APPEND external_project_dependencies gflags) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| INCLUDE(ExternalProject) | ||
|
|
||
| SET(GLOG_SOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/glog) | ||
| SET(GLOG_INSTALL_DIR ${PROJECT_BINARY_DIR}/glog) | ||
|
|
||
| ExternalProject_Add( | ||
| glog | ||
| GIT_REPOSITORY "https://github.com/google/glog.git" | ||
| PREFIX ${GLOG_SOURCES_DIR} | ||
| CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${GLOG_INSTALL_DIR} | ||
| CMAKE_ARGS -DWITH_GFLAGS=OFF | ||
| CMAKE_ARGS -DBUILD_TESTING=OFF | ||
| LOG_DOWNLOAD =ON | ||
| UPDATE_COMMAND "" | ||
| ) | ||
|
|
||
| SET(GLOG_INCLUDE_DIR "${GLOG_INSTALL_DIR}/include" CACHE PATH "glog include directory." FORCE) | ||
| INCLUDE_DIRECTORIES(${GLOG_INCLUDE_DIR}) | ||
|
|
||
| IF(WIN32) | ||
| SET(GLOG_LIBRARIES "${GLOG_INSTALL_DIR}/lib/libglog.lib" CACHE FILEPATH "glog library." FORCE) | ||
| ELSE(WIN32) | ||
| SET(GLOG_LIBRARIES "${GLOG_INSTALL_DIR}/lib/libglog.a" CACHE FILEPATH "glog library." FORCE) | ||
| ENDIF(WIN32) | ||
|
|
||
| LIST(APPEND external_project_dependencies glog) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| INCLUDE(ExternalProject) | ||
|
|
||
| SET(GTEST_SOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/gtest) | ||
| SET(GTEST_INSTALL_DIR ${PROJECT_BINARY_DIR}/gtest) | ||
|
|
||
| ExternalProject_Add( | ||
| gtest | ||
| GIT_REPOSITORY "https://github.com/google/googletest.git" | ||
| GIT_TAG "release-1.8.0" | ||
| PREFIX ${GTEST_SOURCES_DIR} | ||
| CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${GTEST_INSTALL_DIR} | ||
| CMAKE_ARGS -DBUILD_GMOCK=ON | ||
| CMAKE_ARGS -Dgtest_disable_pthreads=ON | ||
| CMAKE_ARGS -Dgtest_force_shared_crt=ON | ||
| LOG_DOWNLOAD =ON | ||
| UPDATE_COMMAND "" | ||
| ) | ||
|
|
||
| SET(GTEST_INCLUDE_DIR "${GTEST_INSTALL_DIR}/include" CACHE PATH "gtest include directory." FORCE) | ||
| INCLUDE_DIRECTORIES(${GTEST_INCLUDE_DIR}) | ||
|
|
||
| IF(WIN32) | ||
| set(GTEST_LIBRARIES | ||
| "${GTEST_INSTALL_DIR}/lib/gtest.lib" | ||
| "${GTEST_INSTALL_DIR}/lib/gtest_main.lib" CACHE FILEPATH "gtest libraries." FORCE) | ||
| ELSE(WIN32) | ||
| set(GTEST_LIBRARIES | ||
| "${GTEST_INSTALL_DIR}/lib/libgtest.a" | ||
| "${GTEST_INSTALL_DIR}/lib/libgtest_main.a" CACHE FILEPATH "gtest libraries." FORCE) | ||
| ENDIF(WIN32) | ||
|
|
||
| ENABLE_TESTING() | ||
|
|
||
| LIST(APPEND external_project_dependencies gtest) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| INCLUDE(ExternalProject) | ||
|
|
||
| SET(NUMPY_SOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/numpy) | ||
| SET(NUMPY_INSTALL_DIR ${PROJECT_BINARY_DIR}/numpy) | ||
| set(NUMPY_VERSION "v1.11.3") | ||
|
|
||
| # setuptools | ||
| ExternalProject_Add(setuptools | ||
| PREFIX ${PYTHON_SOURCES_DIR}/setuptools | ||
| URL http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz | ||
| URL_MD5 7df2a529a074f613b509fb44feefe74e | ||
| BUILD_IN_SOURCE 1 | ||
| UPDATE_COMMAND "" | ||
| PATCH_COMMAND "" | ||
| CONFIGURE_COMMAND "" | ||
| INSTALL_COMMAND "" | ||
| BUILD_COMMAND ${PYTHON_EXECUTABLE} setup.py install | ||
| DEPENDS python zlib | ||
| ) | ||
|
|
||
| ExternalProject_Add(cython | ||
| PREFIX ${PYTHON_SOURCES_DIR}/cython | ||
| GIT_REPOSITORY https://github.com/cython/cython.git | ||
| BUILD_IN_SOURCE 1 | ||
| CONFIGURE_COMMAND "" | ||
| UPDATE_COMMAND "" | ||
| PATCH_COMMAND "" | ||
| INSTALL_COMMAND "" | ||
| BUILD_COMMAND ${PYTHON_EXECUTABLE} setup.py install | ||
| DEPENDS python | ||
| ) | ||
|
|
||
| ExternalProject_Add(numpy | ||
| GIT_REPOSITORY https://github.com/numpy/numpy.git | ||
| GIT_TAG ${NUMPY_VERSION} | ||
| CONFIGURE_COMMAND "" | ||
| UPDATE_COMMAND "" | ||
| PREFIX ${NUMPY_SOURCES_DIR} | ||
| BUILD_COMMAND ${PYTHON_EXECUTABLE} setup.py build | ||
| INSTALL_COMMAND ${PYTHON_EXECUTABLE} setup.py install | ||
| BUILD_IN_SOURCE 1 | ||
| DEPENDS python setuptools cython | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # INCLUDE(cblas) | ||
|
|
||
| INCLUDE(ExternalProject) | ||
|
|
||
| SET(CBLAS_SOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/openblas) | ||
| SET(CBLAS_INSTALL_DIR ${PROJECT_BINARY_DIR}/openblas) | ||
|
|
||
| ExternalProject_Add( | ||
| openblas | ||
| GIT_REPOSITORY "https://github.com/xianyi/OpenBLAS.git" | ||
| GIT_TAG v0.2.19 | ||
| PREFIX ${CBLAS_SOURCES_DIR} | ||
| INSTALL_DIR ${CBLAS_INSTALL_DIR} | ||
| BUILD_IN_SOURCE 1 | ||
| UPDATE_COMMAND "" | ||
| CONFIGURE_COMMAND "" | ||
| BUILD_COMMAND cd ${CBLAS_SOURCES_DIR}/src/openblas && make -j4 | ||
| INSTALL_COMMAND cd ${CBLAS_SOURCES_DIR}/src/openblas && make install PREFIX=<INSTALL_DIR> | ||
| ) | ||
|
|
||
| SET(CBLAS_INCLUDE_DIR "${CBLAS_INSTALL_DIR}/include" CACHE PATH "openblas include directory." FORCE) | ||
| INCLUDE_DIRECTORIES(${CBLAS_INCLUDE_DIR}) | ||
|
|
||
| IF(WIN32) | ||
| set(CBLAS_LIBRARIES "${CBLAS_INSTALL_DIR}/lib/openblas.lib" CACHE FILEPATH "openblas library." FORCE) | ||
| ELSE(WIN32) | ||
| set(CBLAS_LIBRARIES "${CBLAS_INSTALL_DIR}/lib/libopenblas.a" CACHE FILEPATH "openblas library" FORCE) | ||
| ENDIF(WIN32) | ||
|
|
||
| LIST(APPEND external_project_dependencies openblas) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| INCLUDE(ExternalProject) | ||
|
|
||
| SET(PROTOBUF_SOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf) | ||
| SET(PROTOBUF_INSTALL_DIR ${PROJECT_BINARY_DIR}/protobuf) | ||
|
|
||
| ExternalProject_Add( | ||
| protobuf | ||
| PREFIX ${PROTOBUF_SOURCES_DIR} | ||
| DEPENDS zlib | ||
| GIT_REPOSITORY "https://github.com/google/protobuf.git" | ||
| GIT_TAG "v3.0.0" | ||
| CONFIGURE_COMMAND | ||
| ${CMAKE_COMMAND} ${PROTOBUF_SOURCES_DIR}/src/protobuf/cmake | ||
| -Dprotobuf_BUILD_TESTS=OFF | ||
| -DCMAKE_POSITION_INDEPENDENT_CODE=ON | ||
| -DCMAKE_BUILD_TYPE=Release | ||
| -DCMAKE_INSTALL_PREFIX=${PROTOBUF_INSTALL_DIR} | ||
| UPDATE_COMMAND "" | ||
| ) | ||
|
|
||
| SET(PROTOBUF_INCLUDE_DIR "${PROTOBUF_INSTALL_DIR}/include" CACHE PATH "protobuf include directory." FORCE) | ||
| INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR}) | ||
|
|
||
| IF(WIN32) | ||
| SET(PROTOBUF_LIBRARIES | ||
| "${PROTOBUF_INSTALL_DIR}/lib/libprotobuf-lite.lib" | ||
| "${PROTOBUF_INSTALL_DIR}/lib/libprotobuf.lib" | ||
| "${PROTOBUF_INSTALL_DIR}/lib/libprotoc.lib" CACHE FILEPATH "protobuf libraries." FORCE) | ||
| SET(PROTOBUF_PROTOC_EXECUTABLE "${PROTOBUF_INSTALL_DIR}/bin/protoc.exe" CACHE FILEPATH "protobuf executable." FORCE) | ||
| ELSE(WIN32) | ||
| SET(PROTOBUF_LIBRARIES | ||
| "${PROTOBUF_INSTALL_DIR}/lib/libprotobuf-lite.a" | ||
| "${PROTOBUF_INSTALL_DIR}/lib/libprotobuf.a" | ||
| "${PROTOBUF_INSTALL_DIR}/lib/libprotoc.a" CACHE FILEPATH "protobuf libraries." FORCE) | ||
| SET(PROTOBUF_PROTOC_EXECUTABLE "${PROTOBUF_INSTALL_DIR}/bin/protoc" CACHE FILEPATH "protobuf executable." FORCE) | ||
| ENDIF(WIN32) | ||
|
|
||
| LIST(APPEND external_project_dependencies protobuf) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| # Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| INCLUDE(ExternalProject) | ||
|
|
||
| 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 | ||
| PATCH_COMMAND ${CMAKE_COMMAND} | ||
| -DPYTHON_SRC_DIR:PATH=${_python_SOURCE_DIR} | ||
| -P ${CMAKE_CURRENT_LIST_DIR}/PythonPatch.cmake | ||
| ) | ||
| endif() | ||
|
|
||
| if(APPLE) | ||
| list(APPEND EXTERNAL_PROJECT_OPTIONAL_CMAKE_ARGS | ||
| -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON | ||
| ) | ||
| endif() | ||
|
|
||
| set(EXTERNAL_PROJECT_OPTIONAL_CMAKE_CACHE_ARGS) | ||
|
|
||
| # Force Python build to "Release". | ||
| if(CMAKE_CONFIGURATION_TYPES) | ||
| set(SAVED_CMAKE_CFG_INTDIR ${CMAKE_CFG_INTDIR}) | ||
| set(CMAKE_CFG_INTDIR "Release") | ||
| else() | ||
| list(APPEND EXTERNAL_PROJECT_OPTIONAL_CMAKE_CACHE_ARGS | ||
| -DCMAKE_BUILD_TYPE:STRING=Release) | ||
| endif() | ||
|
|
||
| ExternalProject_Add(python | ||
| GIT_REPOSITORY "https://github.com/python-cmake-buildsystem/python-cmake-buildsystem.git" | ||
| GIT_TAG "ed5f9bcee540e47f82fa17f8360b820591aa6d66" | ||
| PREFIX ${PYTHON_SOURCES_DIR} | ||
| UPDATE_COMMAND "" | ||
| CMAKE_CACHE_ARGS | ||
| -DCMAKE_INSTALL_PREFIX:PATH=${PYTHON_INSTALL_DIR} | ||
| -DBUILD_SHARED:BOOL=OFF | ||
| -DBUILD_STATIC:BOOL=ON | ||
| -DUSE_SYSTEM_LIBRARIES:BOOL=OFF | ||
| -DZLIB_ROOT:FILEPATH=${ZLIB_ROOT} | ||
| -DZLIB_INCLUDE_DIR:PATH=${ZLIB_INCLUDE_DIR} | ||
| -DZLIB_LIBRARY:FILEPATH=${ZLIB_LIBRARIES} | ||
| -DDOWNLOAD_SOURCES:BOOL=ON | ||
| -DINSTALL_WINDOWS_TRADITIONAL:BOOL=OFF | ||
| ${EXTERNAL_PROJECT_OPTIONAL_CMAKE_CACHE_ARGS} | ||
| ${EXTERNAL_PROJECT_OPTIONAL_CMAKE_ARGS} | ||
| DEPENDS zlib | ||
| ) | ||
|
|
||
| set(_python_DIR ${PYTHON_INSTALL_DIR}) | ||
|
|
||
| if(UNIX) | ||
| set(_python_IMPORT_SUFFIX so) | ||
| if(APPLE) | ||
| set(_python_IMPORT_SUFFIX dylib) | ||
| endif() | ||
| set(PYTHON_INCLUDE_DIR "${PYTHON_INSTALL_DIR}/include/python2.7" CACHE PATH "Python include dir" FORCE) | ||
| set(PYTHON_LIBRARY "${PYTHON_INSTALL_DIR}/lib/libpython2.7.${_python_IMPORT_SUFFIX}" CACHE FILEPATH "Python library" FORCE) | ||
| set(PYTHON_EXECUTABLE ${PYTHON_INSTALL_DIR}/bin/python CACHE FILEPATH "Python executable" FORCE) | ||
| set(PY_SITE_PACKAGES_PATH "${PYTHON_INSTALL_DIR}/lib/python2.7/site-packages" CACHE PATH "Python site-packages path" FORCE) | ||
| elseif(WIN32) | ||
| set(PYTHON_INCLUDE_DIR "${PYTHON_INSTALL_DIR}/include" CACHE PATH "Python include dir" FORCE) | ||
| set(PYTHON_LIBRARY "${PYTHON_INSTALL_DIR}/libs/python27.lib" CACHE FILEPATH "Python library" FORCE) | ||
| set(PYTHON_EXECUTABLE "${PYTHON_INSTALL_DIR}/bin/python.exe" CACHE FILEPATH "Python executable" FORCE) | ||
| set(PY_SITE_PACKAGES_PATH "${PYTHON_INSTALL_DIR}/Lib/site-packages" CACHE PATH "Python site-packages path" FORCE) | ||
| else() | ||
| message(FATAL_ERROR "Unknown system !") | ||
| endif() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
发现linux下面是lib64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed