From efb70e57de1ef314a6b6dbd6a6fba7dd1f5137e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 30 Mar 2018 23:24:01 +0300 Subject: [PATCH] Fix building the library with cmake for windows Change-Id: Ib6367fa94c60f7239fe02ace81c06054b1b4a837 Reviewed-on: https://chromium-review.googlesource.com/988532 Reviewed-by: Frank Barchard Commit-Queue: Frank Barchard --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6420371de..ef6af435f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,7 +59,11 @@ if(TEST) endif() add_executable(libyuv_unittest ${ly_unittest_sources}) - target_link_libraries(libyuv_unittest ${ly_lib_name} ${GTEST_LIBRARY} pthread) + target_link_libraries(libyuv_unittest ${ly_lib_name} ${GTEST_LIBRARY}) + find_library(PTHREAD_LIBRARY pthread) + if(NOT PTHREAD_LIBRARY STREQUAL "PTHREAD_LIBRARY-NOTFOUND") + target_link_libraries(libyuv_unittest pthread) + endif() if (JPEG_FOUND) target_link_libraries(libyuv_unittest ${JPEG_LIBRARY}) endif() @@ -75,7 +79,7 @@ endif() # install the conversion tool, .so, .a, and all the header files INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin ) INSTALL ( TARGETS ${ly_lib_static} DESTINATION lib ) -INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib ) +INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include ) # create the .deb and .rpm packages using cpack