CMakeLists.txt 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. project(get-graphics-offsets)
  2. add_executable(get-graphics-offsets)
  3. target_sources(
  4. get-graphics-offsets
  5. PRIVATE get-graphics-offsets.c
  6. get-graphics-offsets.h
  7. dxgi-offsets.cpp
  8. d3d8-offsets.cpp
  9. d3d9-offsets.cpp
  10. ../graphics-hook-info.h
  11. ../hook-helpers.h)
  12. target_include_directories(get-graphics-offsets
  13. PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)
  14. target_link_libraries(get-graphics-offsets d3d9.lib dxgi.lib d3d11.lib)
  15. if(MSVC)
  16. target_compile_options(get-graphics-offsets
  17. PRIVATE "$<IF:$<CONFIG:Debug>,/MTd,/MT>")
  18. add_target_resource(win-capture "$<TARGET_PDB_FILE:get-graphics-offsets>"
  19. "obs-plugins/win-capture/" OPTIONAL)
  20. endif()
  21. set_target_properties(get-graphics-offsets PROPERTIES FOLDER
  22. "plugins/win-capture")
  23. set_target_properties(
  24. get-graphics-offsets
  25. PROPERTIES OUTPUT_NAME
  26. "get-graphics-offsets$<IF:$<EQUAL:${CMAKE_SIZEOF_VOID_P},8>,64,32>"
  27. )
  28. add_target_resource(win-capture "$<TARGET_FILE:get-graphics-offsets>"
  29. "obs-plugins/win-capture/")
  30. add_dependencies(win-capture get-graphics-offsets)