FindLIBMGBA.cmake 506 B

12345678910111213141516
  1. find_path(LIBMGBA_INCLUDE_DIR mgba/flags.h)
  2. find_library(LIBMGBA_LIBRARY mgba)
  3. mark_as_advanced(LIBMGBA_INCLUDE_DIR LIBMGBA_LIBRARY)
  4. include(FindPackageHandleStandardArgs)
  5. find_package_handle_standard_args(LIBMGBA DEFAULT_MSG
  6. LIBMGBA_INCLUDE_DIR LIBMGBA_LIBRARY)
  7. if(LIBMGBA_FOUND AND NOT mGBA::mgba)
  8. add_library(mGBA::mgba UNKNOWN IMPORTED)
  9. set_target_properties(mGBA::mgba PROPERTIES
  10. IMPORTED_LOCATION "${LIBMGBA_LIBRARY}"
  11. INTERFACE_INCLUDE_DIRECTORIES "${LIBMGBA_INCLUDE_DIR}"
  12. )
  13. endif()