OLD | NEW |
1 cmake_minimum_required(VERSION 2.8) | 1 cmake_minimum_required(VERSION 2.8) |
2 | 2 |
3 # CMakeLists for libyuv | 3 # CMakeLists for libyuv |
4 # Originally created for "roxlu build system" to compile libyuv on windows | 4 # Originally created for "roxlu build system" to compile libyuv on windows |
5 # Run with -DTEST=ON to build unit tests | 5 # Run with -DTEST=ON to build unit tests |
6 option(TEST "Built unit tests" OFF) | 6 option(TEST "Built unit tests" OFF) |
7 | 7 |
8 set(ly_base_dir ${CMAKE_CURRENT_LIST_DIR}) | 8 set(ly_base_dir ${CMAKE_CURRENT_LIST_DIR}) |
9 set(ly_src_dir ${ly_base_dir}/source/) | 9 set(ly_src_dir ${ly_base_dir}/source/) |
10 set(ly_inc_dir ${ly_base_dir}/include) | 10 set(ly_inc_dir ${ly_base_dir}/include) |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 else() | 121 else() |
122 message(FATAL_ERROR "TEST is set but unable to find gtest library") | 122 message(FATAL_ERROR "TEST is set but unable to find gtest library") |
123 endif() | 123 endif() |
124 endif() | 124 endif() |
125 | 125 |
126 add_executable(libyuv_unittest ${ly_unittest_sources}) | 126 add_executable(libyuv_unittest ${ly_unittest_sources}) |
127 target_link_libraries(libyuv_unittest ${ly_lib_name} ${GTEST_LIBRARY} pthread) | 127 target_link_libraries(libyuv_unittest ${ly_lib_name} ${GTEST_LIBRARY} pthread) |
128 if (JPEG_FOUND) | 128 if (JPEG_FOUND) |
129 target_link_libraries(libyuv_unittest ${JPEG_LIBRARY}) | 129 target_link_libraries(libyuv_unittest ${JPEG_LIBRARY}) |
130 endif() | 130 endif() |
| 131 |
| 132 if(NACL AND NACL_LIBC STREQUAL "newlib") |
| 133 target_link_libraries(libyuv_unittest glibc-compat) |
| 134 endif() |
| 135 |
| 136 target_link_libraries(libyuv_unittest gflags) |
| 137 |
131 endif() | 138 endif() |
132 | 139 |
133 if(NACL AND NACL_LIBC STREQUAL "newlib") | |
134 target_link_libraries(libyuv_unittest glibc-compat) | |
135 endif() | |
136 | |
137 target_link_libraries(libyuv_unittest gflags) | |
138 | |
139 install(TARGETS ${ly_lib_name} DESTINATION lib) | 140 install(TARGETS ${ly_lib_name} DESTINATION lib) |
140 install(FILES ${ly_header_files} DESTINATION include/libyuv) | 141 install(FILES ${ly_header_files} DESTINATION include/libyuv) |
141 install(FILES ${ly_inc_dir}/libyuv.h DESTINATION include/) | 142 install(FILES ${ly_inc_dir}/libyuv.h DESTINATION include/) |
OLD | NEW |