Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: CMakeLists.txt

Issue 1847233002: cmake move libyuv_unittest target into the if(TEST) condition (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | README.chromium » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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/)
OLDNEW
« no previous file with comments | « no previous file | README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698