1
0

CMakeLists.txt 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. if(POLICY CMP0090)
  2. cmake_policy(SET CMP0090 NEW)
  3. endif()
  4. project(obs-frontend-api)
  5. add_library(obs-frontend-api SHARED)
  6. add_library(OBS::frontend-api ALIAS obs-frontend-api)
  7. target_sources(obs-frontend-api PRIVATE obs-frontend-api.h obs-frontend-api.cpp
  8. obs-frontend-internal.hpp)
  9. target_link_libraries(obs-frontend-api PRIVATE OBS::libobs)
  10. target_compile_features(obs-frontend-api PUBLIC cxx_auto_type cxx_std_17
  11. c_std_11)
  12. target_include_directories(
  13. obs-frontend-api PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
  14. $<INSTALL_INTERFACE:${OBS_INCLUDE_DESTINATION}>)
  15. set_target_properties(
  16. obs-frontend-api
  17. PROPERTIES FOLDER "frontend"
  18. VERSION "${OBS_VERSION_MAJOR}"
  19. SOVERSION "0"
  20. PUBLIC_HEADER obs-frontend-api.h)
  21. if(OS_WINDOWS)
  22. set(MODULE_DESCRIPTION "OBS Frontend API")
  23. configure_file(${CMAKE_SOURCE_DIR}/cmake/bundle/windows/obs-module.rc.in
  24. obs-frontend-api.rc)
  25. target_sources(obs-frontend-api PRIVATE obs-frontend-api.rc)
  26. elseif(OS_MACOS)
  27. set_target_properties(obs-frontend-api PROPERTIES SOVERSION "1")
  28. endif()
  29. setup_binary_target(obs-frontend-api)
  30. export_target(obs-frontend-api)