link lm publicly to FLAC
[flac.git] / microbench / CMakeLists.txt
blob639915b6307404bdc8fd07b2cf39a829dbeb8b14
1 if(MSVC)
2     return()
3 endif()
5 set(CMAKE_REQUIRED_LIBRARIES rt)
6 check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
8 if(APPLE)
9     add_definitions(-DFLAC__SYS_DARWIN)
10 endif()
12 add_executable(benchmark_residual benchmark_residual.c util.c)
13 target_include_directories(benchmark_residual PRIVATE
14     "$<TARGET_PROPERTY:FLAC,SOURCE_DIR>/include")
15 target_link_libraries(benchmark_residual
16     FLAC
17     $<$<BOOL:${HAVE_CLOCK_GETTIME}>:rt>)