Findcityhash.cmake.linux 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. #
  2. # All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
  3. # its licensors.
  4. #
  5. # For complete copyright and license terms please see the LICENSE at the root of this
  6. # distribution (the "License"). All use of this software is governed by the License,
  7. # or, if provided, by the license below or the license accompanying this file. Do not
  8. # remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
  9. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. #
  11. set(MY_NAME "cityhash")
  12. set(TARGET_WITH_NAMESPACE "3rdParty::${MY_NAME}")
  13. if (TARGET ${TARGET_WITH_NAMESPACE})
  14. return()
  15. endif()
  16. set(${MY_NAME}_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/cityhash/include)
  17. set(${MY_NAME}_LIBS_DIR ${CMAKE_CURRENT_LIST_DIR}/cityhash/lib)
  18. set(${MY_NAME}_LIBRARY ${${MY_NAME}_LIBS_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}cityhash${CMAKE_STATIC_LIBRARY_SUFFIX})
  19. add_library(${TARGET_WITH_NAMESPACE} INTERFACE IMPORTED GLOBAL)
  20. ly_target_include_system_directories(TARGET ${TARGET_WITH_NAMESPACE} INTERFACE ${${MY_NAME}_INCLUDE_DIR})
  21. target_link_libraries(${TARGET_WITH_NAMESPACE}
  22. INTERFACE ${${MY_NAME}_LIBRARY}
  23. )
  24. set(${MY_NAME}_FOUND True)