--- 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(BUILD_PKGCONFIG_FILES) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libopenjp2.pc.cmake.in + ${PROJECT_BINARY_DIR}/libopenjp2.pc @ONLY) +endif(BUILD_PKGCONFIG_FILES) --- 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 ) #