diff --git a/cmake/external_libs/absl.cmake b/cmake/external_libs/absl.cmake index 342fd60407..c345f7b87e 100644 --- a/cmake/external_libs/absl.cmake +++ b/cmake/external_libs/absl.cmake @@ -25,5 +25,3 @@ mindspore_add_pkg( TARGET_ALIAS mindspore::absl_raw_logging_internal absl::raw_logging_internal TARGET_ALIAS mindspore::absl_int128 absl::int128 TARGET_ALIAS mindspore::absl_bad_optional_access absl::bad_optional_access) - -include_directories(${absl_INC}) diff --git a/cmake/external_libs/c-ares.cmake b/cmake/external_libs/c-ares.cmake index 0d07da5b79..183bfa3a46 100644 --- a/cmake/external_libs/c-ares.cmake +++ b/cmake/external_libs/c-ares.cmake @@ -16,5 +16,3 @@ mindspore_add_pkg( CMAKE_OPTION -DCMAKE_BUILD_TYPE:STRING=Release -DCARES_SHARED:BOOL=OFF -DCARES_STATIC:BOOL=ON -DCARES_STATIC_PIC:BOOL=ON -DHAVE_LIBNSL:BOOL=OFF TARGET_ALIAS mindspore::cares c-ares::cares) - -include_directories(${c-ares_INC}) diff --git a/cmake/external_libs/cppjieba.cmake b/cmake/external_libs/cppjieba.cmake index e09e332e0f..3ff034fc56 100644 --- a/cmake/external_libs/cppjieba.cmake +++ b/cmake/external_libs/cppjieba.cmake @@ -19,5 +19,3 @@ mindspore_add_pkg( PATCHES ${TOP_DIR}/third_party/patch/cppjieba/cppjieba.patch001 ${TOP_DIR}/third_party/patch/cppjieba/cppjieba.patch002 TARGET_ALIAS mindspore::cppjieba cppjieba::cppjieba) -include_directories(${cppjieba_INC}include) -include_directories(${cppjieba_INC}deps) diff --git a/cmake/external_libs/eigen.cmake b/cmake/external_libs/eigen.cmake index e856ed6d75..f773e70ed7 100644 --- a/cmake/external_libs/eigen.cmake +++ b/cmake/external_libs/eigen.cmake @@ -11,8 +11,3 @@ mindspore_add_pkg( MD5 ${MD5} CMAKE_OPTION -DBUILD_TESTING=OFF TARGET_ALIAS mindspore::eigen Eigen3::Eigen) -if(NOT TARGET Eigen3::Eigen) - message(FATAL_ERROR "Failed to find Eigen3::Eigen") -endif() -include_directories(${Eigen3_INC}) -include_directories(${EIGEN3_INCLUDE_DIR}) diff --git a/cmake/external_libs/flatbuffers.cmake b/cmake/external_libs/flatbuffers.cmake index eea369836a..cbeb00c55d 100644 --- a/cmake/external_libs/flatbuffers.cmake +++ b/cmake/external_libs/flatbuffers.cmake @@ -49,8 +49,6 @@ mindspore_add_pkg( TARGET_ALIAS mindspore::flatbuffers flatbuffers::${_flatbuffer_lib_name} TARGET_ALIAS mindspore::flatc flatbuffers::flatc) -include_directories(${flatbuffers_INC}) - function(ms_build_flatbuffers source_schema_files source_schema_dirs custom_target_name generated_output_dir) set(total_schema_dirs "") set(total_generated_files "") diff --git a/cmake/external_libs/glog.cmake b/cmake/external_libs/glog.cmake index 4a0f3a12cc..3778ece372 100644 --- a/cmake/external_libs/glog.cmake +++ b/cmake/external_libs/glog.cmake @@ -46,7 +46,6 @@ mindspore_add_pkg( PATCHES ${glog_patch} CMAKE_OPTION ${glog_option} TARGET_ALIAS mindspore::glog glog::glog) -include_directories(${glog_INC}) if(NOT MS_PREFER_SYSTEM_PKGS AND NOT MS_GLOG_PREFER_SYSTEM) set(MS_PATCHED_GLOG_NAME diff --git a/cmake/external_libs/grpc.cmake b/cmake/external_libs/grpc.cmake index 27178ae59c..c09b66e1c2 100644 --- a/cmake/external_libs/grpc.cmake +++ b/cmake/external_libs/grpc.cmake @@ -99,8 +99,6 @@ mindspore_add_pkg( ${_FINDPACKAGE_RE2_CONFIG_DIR} TARGET_ALIAS mindspore::grpc++ gRPC::grpc++) -include_directories(${grpc_INC}) - # modify mindspore macro define add_compile_definitions(grpc=mindspore_grpc) add_compile_definitions(grpc_impl=mindspore_grpc_impl) diff --git a/cmake/external_libs/gtest.cmake b/cmake/external_libs/gtest.cmake index 5239bfc9f3..1be59454b2 100644 --- a/cmake/external_libs/gtest.cmake +++ b/cmake/external_libs/gtest.cmake @@ -49,8 +49,6 @@ mindspore_add_pkg( TARGET_ALIAS mindspore::gtest GTest::gtest TARGET_ALIAS mindspore::gmock GTest::gmock) -include_directories(${gtest_INC}) - foreach(_tgt GTest::gtest GTest::gtest_main GTest::gmock GTest::gmock_main) foreach(_prop IMPORTED_LOCATION_RELEASE IMPORTED_LOCATION IMPORTED_LOCATION_DEBUG IMPORTED_LOCATION_NOCONFIG) get_target_property(_lib ${_tgt} ${_prop}) diff --git a/cmake/external_libs/icu4c.cmake b/cmake/external_libs/icu4c.cmake index 47ce437613..db4f6ce0b9 100644 --- a/cmake/external_libs/icu4c.cmake +++ b/cmake/external_libs/icu4c.cmake @@ -46,7 +46,6 @@ else() TARGET_ALIAS mindspore::icudata ICU::data TARGET_ALIAS mindspore::icui18n ICU::i18n) - include_directories(${icu4c_INC}) if(CMAKE_SYSTEM_NAME MATCHES "Darwin" AND NOT MS_ICU_PREFER_SYSTEM) include(${CMAKE_SOURCE_DIR}/cmake/change_rpath.cmake) changerpath($ ${LIB_ICU_COMMON} "libicuuc;libicudata") diff --git a/cmake/external_libs/jpeg_turbo.cmake b/cmake/external_libs/jpeg_turbo.cmake index 61ea173712..0f73c27c5c 100644 --- a/cmake/external_libs/jpeg_turbo.cmake +++ b/cmake/external_libs/jpeg_turbo.cmake @@ -56,4 +56,3 @@ mindspore_add_pkg( PATCHES ${JPEG_TURBO_PATCHE} TARGET_ALIAS mindspore::jpeg_turbo TurboJPEG::JPEG TARGET_ALIAS mindspore::turbojpeg TurboJPEG::TurboJPEG) -include_directories(${jpeg_turbo_INC}) diff --git a/cmake/external_libs/json.cmake b/cmake/external_libs/json.cmake index d824f31b44..5ea3c7f7cf 100644 --- a/cmake/external_libs/json.cmake +++ b/cmake/external_libs/json.cmake @@ -25,4 +25,3 @@ mindspore_add_pkg( MD5 ${MD5} CMAKE_OPTION -DBUILD_TESTING=OFF -DJSON_MultipleHeaders=ON TARGET_ALIAS mindspore::json nlohmann_json::nlohmann_json) -include_directories(${nlohmann_json_INC}) diff --git a/cmake/external_libs/libevent.cmake b/cmake/external_libs/libevent.cmake index 350ac722c8..17e93d4d7f 100644 --- a/cmake/external_libs/libevent.cmake +++ b/cmake/external_libs/libevent.cmake @@ -28,5 +28,3 @@ mindspore_add_pkg( TARGET_ALIAS mindspore::event_pthreads libevent::pthreads TARGET_ALIAS mindspore::event_core libevent::core TARGET_ALIAS mindspore::event_openssl libevent::openssl) - -include_directories(${libevent_INC}) diff --git a/cmake/external_libs/libtiff.cmake b/cmake/external_libs/libtiff.cmake index d0c4d46644..9daa338276 100644 --- a/cmake/external_libs/libtiff.cmake +++ b/cmake/external_libs/libtiff.cmake @@ -41,6 +41,7 @@ mindspore_add_pkg( -Dwebp=OFF -DBUILD_SHARED_LIBS=OFF -Dlibdeflate=OFF) + set(tiff_INC "${TIFF_INCLUDE_DIR}") set(tiff_LIB "${TIFF_LIBRARIES}") diff --git a/cmake/external_libs/mkl_dnn.cmake b/cmake/external_libs/mkl_dnn.cmake index e327887491..81b00f9006 100644 --- a/cmake/external_libs/mkl_dnn.cmake +++ b/cmake/external_libs/mkl_dnn.cmake @@ -38,5 +38,3 @@ mindspore_add_pkg( MD5 ${MD5} ${ARGS} TARGET_ALIAS mindspore::dnnl DNNL::dnnl TARGET_ALIAS mindspore::mkldnn DNNL::dnnl) - -include_directories(${onednn_INC}) diff --git a/cmake/external_libs/nccl.cmake b/cmake/external_libs/nccl.cmake index 4374e2cdf2..f4b3b1a62f 100644 --- a/cmake/external_libs/nccl.cmake +++ b/cmake/external_libs/nccl.cmake @@ -17,4 +17,3 @@ mindspore_add_pkg( BUILD_OPTION_PASS_PREFIX GEN_CMAKE_CONFIG TARGET_ALIAS mindspore::nccl nccl::nccl) -include_directories(${nccl_INC}) diff --git a/cmake/external_libs/ompi.cmake b/cmake/external_libs/ompi.cmake index 652a03e606..1a83519f1b 100644 --- a/cmake/external_libs/ompi.cmake +++ b/cmake/external_libs/ompi.cmake @@ -17,4 +17,3 @@ mindspore_add_pkg( PRE_CONFIGURE_COMMAND ./autogen.pl CONFIGURE_COMMAND ./configure TARGET_ALIAS mindspore::ompi MPI::MPI_C) -include_directories(${ompi_INC}) diff --git a/cmake/external_libs/opencv.cmake b/cmake/external_libs/opencv.cmake index 01910553e2..5334c12369 100644 --- a/cmake/external_libs/opencv.cmake +++ b/cmake/external_libs/opencv.cmake @@ -76,11 +76,3 @@ mindspore_add_pkg( TARGET_ALIAS mindspore::opencv_core opencv_core TARGET_ALIAS mindspore::opencv_imgcodecs opencv_imgcodecs TARGET_ALIAS mindspore::opencv_imgproc opencv_imgproc) - -if(MSVC) - include_directories(${opencv_INC}) -elseif(WIN32) - include_directories(${opencv_INC}) -else() - include_directories(${opencv_INC}/opencv4) -endif() diff --git a/cmake/external_libs/openssl.cmake b/cmake/external_libs/openssl.cmake index b570c2a161..aa8647f5b7 100644 --- a/cmake/external_libs/openssl.cmake +++ b/cmake/external_libs/openssl.cmake @@ -24,5 +24,4 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR APPLE) GEN_CMAKE_CONFIG TARGET_ALIAS mindspore::ssl OpenSSL::SSL TARGET_ALIAS mindspore::crypto OpenSSL::Crypto) - include_directories(${openssl_INC}) endif() diff --git a/cmake/external_libs/protobuf.cmake b/cmake/external_libs/protobuf.cmake index c49f9ca164..f10e78c2a4 100644 --- a/cmake/external_libs/protobuf.cmake +++ b/cmake/external_libs/protobuf.cmake @@ -59,7 +59,6 @@ mindspore_add_pkg( -DCMAKE_POSITION_INDEPENDENT_CODE=ON TARGET_ALIAS mindspore::protobuf protobuf::libprotobuf) -include_directories(${protobuf_INC}) set(CMAKE_CXX_FLAGS ${_ms_tmp_CMAKE_CXX_FLAGS}) if(MSVC) set(CMAKE_STATIC_LIBRARY_PREFIX, ${_ms_tmp_CMAKE_STATIC_LIBRARY_PREFIX}) diff --git a/cmake/external_libs/pybind11.cmake b/cmake/external_libs/pybind11.cmake index 0dcb34f8d1..e7d674d6e8 100644 --- a/cmake/external_libs/pybind11.cmake +++ b/cmake/external_libs/pybind11.cmake @@ -41,4 +41,3 @@ mindspore_add_pkg( MD5 ${MD5} CMAKE_OPTION -DPYBIND11_TEST=OFF -DPYBIND11_LTO_CXX_FLAGS=FALSE TARGET_ALIAS mindspore::pybind11_module pybind11::module) -include_directories(${pybind11_INC}) diff --git a/cmake/external_libs/re2.cmake b/cmake/external_libs/re2.cmake index 2c1c359f93..809899fa99 100644 --- a/cmake/external_libs/re2.cmake +++ b/cmake/external_libs/re2.cmake @@ -20,5 +20,3 @@ mindspore_add_pkg( CMAKE_OPTION -DCMAKE_BUILD_TYPE:STRING=Release -DRE2_BUILD_TESTING:BOOL=OFF -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=TRUE TARGET_ALIAS mindspore::re2 re2::re2) - -include_directories(${re2_INC}) diff --git a/cmake/external_libs/sentencepiece.cmake b/cmake/external_libs/sentencepiece.cmake index cb75dc9612..723730ee7d 100644 --- a/cmake/external_libs/sentencepiece.cmake +++ b/cmake/external_libs/sentencepiece.cmake @@ -42,5 +42,3 @@ mindspore_add_pkg( MD5 ${MD5} ${PATCHES} TARGET_ALIAS mindspore::sentencepiece sentencepiece::sentencepiece TARGET_ALIAS mindspore::sentencepiece_train sentencepiece::sentencepiece_train) - -include_directories(${sentencepiece_INC}) diff --git a/cmake/external_libs/sqlite.cmake b/cmake/external_libs/sqlite.cmake index bb472cb3c1..b8034833b5 100644 --- a/cmake/external_libs/sqlite.cmake +++ b/cmake/external_libs/sqlite.cmake @@ -33,5 +33,3 @@ mindspore_add_pkg( MD5 ${MD5} ${PATCHES} ${CONFIGURE_COMMAND} GEN_CMAKE_CONFIG TARGET_ALIAS mindspore::sqlite SQLite::SQLite3) - -include_directories(${sqlite_INC}) diff --git a/cmake/external_libs/tinyxml2.cmake b/cmake/external_libs/tinyxml2.cmake index d15b6db817..a56c54d238 100644 --- a/cmake/external_libs/tinyxml2.cmake +++ b/cmake/external_libs/tinyxml2.cmake @@ -22,4 +22,3 @@ mindspore_add_pkg( CMAKE_PKG_NO_COMPONENTS MD5 ${MD5} TARGET_ALIAS mindspore::tinyxml2 tinyxml2::tinyxml2) -include_directories(${tinyxml2_INC}) diff --git a/cmake/external_libs/zlib.cmake b/cmake/external_libs/zlib.cmake index 9bef8366d4..3edcd3e7c0 100644 --- a/cmake/external_libs/zlib.cmake +++ b/cmake/external_libs/zlib.cmake @@ -16,5 +16,3 @@ mindspore_add_pkg( MD5 ${MD5} CMAKE_OPTION -DCMAKE_BUILD_TYPE:STRING=Release TARGET_ALIAS mindspore::z ZLIB::ZLIB) - -include_directories(${zlib_INC})