You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
677 B

1 year ago
1 year ago
1 year ago
  1. #find_package(glog REQUIRED)
  2. #list(APPEND third_party_libraries glog::glog)
  3. #在/usr/bin目录里面 我需要clion自动关联里面的库,有好几个库的
  4. set(GLOG_ROOT_DIR ${LIB_BASE_DIR}/glog-src)
  5. set(GLOG_BUILD_DIR ${LIB_BASE_DIR}/glog-build)
  6. if(NOT EXISTS ${GLOG_BUILD_DIR})
  7. execute_process(
  8. COMMAND mkdir ${GLOG_BUILD_DIR} && cmake -S ${GLOG_ROOT_DIR} -B ${GLOG_BUILD_DIR}
  9. WORKING_DIRECTORY ${LIB_BASE_DIR})
  10. execute_process(
  11. COMMAND cmake --build . -j4
  12. WORKING_DIRECTORY ${GLOG_BUILD_DIR})
  13. endif()
  14. include_directories(GLOG_BUILD_DIR)
  15. # glog::glog is imported target
  16. list(APPEND third_party_libraries glog)