Findastc-encoder.cmake.linux-x86_64 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. #
  2. # Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
  3. #
  4. # SPDX-License-Identifier: Apache-2.0 OR MIT
  5. #
  6. # this file actually ingests the library and defines targets.
  7. set(LIB_NAME "astc-encoder")
  8. set(TARGET_WITH_NAMESPACE "3rdParty::${LIB_NAME}")
  9. set(${LIB_NAME}_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/${LIB_NAME}/include)
  10. set(${LIB_NAME}_LIBRARY_DIR ${CMAKE_CURRENT_LIST_DIR}/${LIB_NAME}/bin)
  11. set(${LIB_NAME}_LIBRARY_RELEASE ${${LIB_NAME}_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}astcenc-sse4.1-static${CMAKE_STATIC_LIBRARY_SUFFIX})
  12. set(${LIB_NAME}_LIBRARY_DEBUG ${${LIB_NAME}_LIBRARY_RELEASE})
  13. # declare the target so that others can 'depend on it'
  14. add_library(${TARGET_WITH_NAMESPACE} STATIC IMPORTED GLOBAL)
  15. # add include directory
  16. ly_target_include_system_directories(TARGET ${TARGET_WITH_NAMESPACE} INTERFACE ${${LIB_NAME}_INCLUDE_DIR})
  17. # add static library as "output" IMPORTED_LOCATION for the target
  18. set_target_properties(${TARGET_WITH_NAMESPACE}
  19. PROPERTIES
  20. IMPORTED_LOCATION_DEBUG ${${LIB_NAME}_LIBRARY_DEBUG}
  21. IMPORTED_LOCATION ${${LIB_NAME}_LIBRARY_RELEASE}
  22. )
  23. set(${LIB_NAME}_FOUND True)