Commit efb70e57 authored by Martin Storsjö's avatar Martin Storsjö Committed by Commit Bot

Fix building the library with cmake for windows

Change-Id: Ib6367fa94c60f7239fe02ace81c06054b1b4a837
Reviewed-on: https://chromium-review.googlesource.com/988532Reviewed-by: 's avatarFrank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
parent 816b7b12
......@@ -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
......
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