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

dependency_securec.cmake 795 B

1234567891011121314151617181920212223242526
  1. # securec library
  2. #
  3. #
  4. # SECUREC_LIBRARY
  5. #
  6. if(NOT TARGET securec)
  7. set(_ms_tmp_CMAKE_POSITION_INDEPENDENT_CODE ${CMAKE_POSITION_INDEPENDENT_CODE})
  8. set(_ms_tmp_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
  9. if(TARGET_OHOS_LITE)
  10. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SECURE_CXX_FLAGS}")
  11. else()
  12. set(CMAKE_C_FLAGS "${SECURE_CXX_FLAGS}")
  13. endif()
  14. if(CMAKE_SYSTEM_NAME MATCHES "Windows")
  15. add_compile_definitions(SECUREC_ONLY_DECLARE_MEMSET)
  16. endif()
  17. add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/securec ${CMAKE_BINARY_DIR}/securec)
  18. set(CMAKE_POSITION_INDEPENDENT_CODE ${_ms_tmp_CMAKE_POSITION_INDEPENDENT_CODE})
  19. set(CMAKE_C_FLAGS ${_ms_tmp_CMAKE_C_FLAGS})
  20. endif()
  21. include_directories(${CMAKE_CURRENT_LIST_DIR}/../third_party/securec/include)
  22. set(SECUREC_LIBRARY securec)