From 7c65337c7576d7ced2e2b1019d66931b9caba690 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 23 Jun 2016 17:43:44 -0700 Subject: [PATCH] w32-pthreads: Fully export library (MSVC) Allows the library to be used by external plugins --- deps/w32-pthreads/CMakeLists.txt | 5 +++-- deps/w32-pthreads/w32-pthreadsConfig.cmake.in | 15 +++++++++++++++ .../w32-pthreadsConfigVersion.cmake.in | 0 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 deps/w32-pthreads/w32-pthreadsConfig.cmake.in create mode 100644 deps/w32-pthreads/w32-pthreadsConfigVersion.cmake.in diff --git a/deps/w32-pthreads/CMakeLists.txt b/deps/w32-pthreads/CMakeLists.txt index 497d5abd6..992ec69d6 100644 --- a/deps/w32-pthreads/CMakeLists.txt +++ b/deps/w32-pthreads/CMakeLists.txt @@ -19,7 +19,8 @@ add_library(w32-pthreads SHARED target_compile_definitions(w32-pthreads PRIVATE __CLEANUP_C PTW32_BUILD) target_include_directories(w32-pthreads - PUBLIC .) + PUBLIC + "$") target_link_libraries(w32-pthreads) -install_obs_core(w32-pthreads) +install_obs_core(w32-pthreads EXPORT w32-pthreads) diff --git a/deps/w32-pthreads/w32-pthreadsConfig.cmake.in b/deps/w32-pthreads/w32-pthreadsConfig.cmake.in new file mode 100644 index 000000000..2fe4aecda --- /dev/null +++ b/deps/w32-pthreads/w32-pthreadsConfig.cmake.in @@ -0,0 +1,15 @@ +# - Config file for the w32-pthreads package +# It defines the following variables +# THREADS_INCLUDE_DIRS +# THREADS_LIBRARIES + +set(W32_PTHREADS_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@") + +# Cleanup possible relative paths +get_filename_component(W32_PTHREADS_INCLUDE_DIRS "${THREADS_INCLUDE_DIRS}" ABSOLUTE) + +if(NOT TARGET w32-pthreads) + include("${CMAKE_CURRENT_LIST_DIR}/w32-pthreadsTarget.cmake") +endif() + +set(W32_PTHREADS_LIBRARIES w32-pthreads) diff --git a/deps/w32-pthreads/w32-pthreadsConfigVersion.cmake.in b/deps/w32-pthreads/w32-pthreadsConfigVersion.cmake.in new file mode 100644 index 000000000..e69de29bb