CMakeLists.txt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright 2019 Google
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. if(APPLE)
  15. set(
  16. sources
  17. macOS/main.m
  18. macOS/AppDelegate.m
  19. macOS/AppDelegate.h
  20. )
  21. set(
  22. resources
  23. GoogleService-Info.plist
  24. )
  25. add_executable(
  26. firestore_example_app_macos MACOSX_BUNDLE
  27. ${sources}
  28. )
  29. add_objc_flags(
  30. firestore_example_app_macos
  31. ${sources}
  32. )
  33. target_link_libraries(
  34. firestore_example_app_macos
  35. PRIVATE "-framework AppKit"
  36. )
  37. set_target_properties(
  38. firestore_example_app_macos PROPERTIES
  39. MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/macOS/Info.plist
  40. RESOURCE "${resources}"
  41. )
  42. endif(APPLE)