2021-11-29 22:02:23 +01:00
|
|
|
if(POLICY CMP0090)
|
|
|
|
cmake_policy(SET CMP0090 NEW)
|
|
|
|
endif()
|
|
|
|
|
2014-01-20 16:58:58 +01:00
|
|
|
project(w32-pthreads)
|
|
|
|
|
2021-11-29 22:02:23 +01:00
|
|
|
add_library(w32-pthreads SHARED)
|
|
|
|
add_library(OBS::w32-pthreads ALIAS w32-pthreads)
|
|
|
|
|
|
|
|
target_sources(w32-pthreads PRIVATE implement.h pthread.c pthread.h sched.h
|
|
|
|
semaphore.h w32-pthreads.rc)
|
2014-05-05 19:07:42 +02:00
|
|
|
|
2019-06-16 21:42:58 +10:00
|
|
|
set(MODULE_DESCRIPTION "POSIX Threads for Windows")
|
2021-11-29 22:02:23 +01:00
|
|
|
configure_file(${CMAKE_SOURCE_DIR}/cmake/bundle/windows/obs-module.rc.in
|
|
|
|
w32-pthreads.rc)
|
|
|
|
|
|
|
|
target_compile_definitions(w32-pthreads PRIVATE __CLEANUP_C PTW32_BUILD)
|
|
|
|
|
|
|
|
target_include_directories(
|
|
|
|
w32-pthreads PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
|
|
|
|
|
2020-05-13 06:37:01 -07:00
|
|
|
set_target_properties(w32-pthreads PROPERTIES FOLDER "deps")
|
2014-04-19 20:33:45 -07:00
|
|
|
|
2021-11-29 22:02:23 +01:00
|
|
|
setup_binary_target(w32-pthreads)
|
|
|
|
export_target(w32-pthreads)
|