Commit 81d9ee00 authored by Sean McGovern's avatar Sean McGovern Committed by Konstantin Pavlov

contrib: openjpeg: import pthreads library where necessary

parent a1dbb411
--- openjpeg/src/lib/openjp2/libopenjp2.pc.cmake.in.ORIG 2017-10-04 18:23:14.000000000 -0400
+++ openjpeg/src/lib/openjp2/libopenjp2.pc.cmake.in 2017-12-05 19:05:07.578239280 -0500
@@ -10,5 +10,5 @@
URL: http://www.openjpeg.org/
Version: @OPENJPEG_VERSION@
Libs: -L${libdir} -lopenjp2
-Libs.private: -lm
+Libs.private: -lm @PTHREAD_LIBS@
Cflags: -I${includedir}
--- openjpeg/src/lib/openjp2/CMakeLists.txt.ORIG 2017-12-05 19:24:42.152312033 -0500
+++ openjpeg/src/lib/openjp2/CMakeLists.txt 2017-12-05 19:25:35.097306981 -0500
@@ -188,6 +188,7 @@
endif(OPJ_USE_THREAD AND Threads_FOUND AND CMAKE_USE_WIN32_THREADS_INIT )
if(OPJ_USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT )
+ set(PTHREAD_LIBS ${CMAKE_THREAD_LIBS_INIT})
add_definitions( -DMUTEX_pthread)
endif(OPJ_USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT )
@@ -216,3 +216,8 @@
target_link_libraries(test_sparse_array ${CMAKE_THREAD_LIBS_INIT})
endif(OPJ_USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
endif(BUILD_UNIT_TESTS)
+
+if(UNIX)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libopenjp2.pc.cmake.in
+ ${PROJECT_BINARY_DIR}/libopenjp2.pc @ONLY)
+endif(UNIX)
--- openjpeg/CMakeLists.txt.ORIG 2017-10-04 18:23:14.000000000 -0400
+++ openjpeg/CMakeLists.txt 2017-12-05 19:43:35.573788173 -0500
@@ -359,8 +359,6 @@
endif()
if(BUILD_PKGCONFIG_FILES)
# install in lib and not share (see multi-arch note above)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp2/libopenjp2.pc.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc @ONLY)
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjp2.pc DESTINATION
${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
#
......@@ -17,6 +17,7 @@ endif
# $(APPLY) $(SRC)/openjpeg/restrict.patch
$(APPLY) $(SRC)/openjpeg/install.patch
$(APPLY) $(SRC)/openjpeg/pic.patch
$(APPLY) $(SRC)/openjpeg/openjp2_pthread.patch
$(call pkg_static,"./src/lib/openjp2/libopenjp2.pc.cmake.in")
$(MOVE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment