CMakeLists.txt 662 B

1234567891011121314151617181920212223242526272829
  1. project(w32-pthreads)
  2. if(NOT WIN32)
  3. return()
  4. endif()
  5. set(MODULE_DESCRIPTION "POSIX Threads for Windows")
  6. configure_file(${CMAKE_SOURCE_DIR}/cmake/winrc/obs-module.rc.in w32-pthreads.rc)
  7. set(w32-pthreads_SOURCES
  8. pthread.c
  9. w32-pthreads.rc)
  10. set(w32-pthreads_HEADERS
  11. implement.h
  12. pthread.h
  13. sched.h
  14. semaphore.h)
  15. add_library(w32-pthreads SHARED
  16. ${w32-pthreads_SOURCES}
  17. ${w32-pthreads_HEADERS})
  18. target_compile_definitions(w32-pthreads
  19. PRIVATE __CLEANUP_C PTW32_BUILD)
  20. target_include_directories(w32-pthreads
  21. PUBLIC
  22. "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
  23. target_link_libraries(w32-pthreads)
  24. install_obs_core(w32-pthreads EXPORT w32-pthreads)