History

Fix indentation

Alexander Grund committed 7 years ago

Commit bb689b11 parent af1d8841 file · +50 −51Browse files

Unified · Split

CMakeLists.txt+50−51
@@ -49,7 +49,7 @@ if(RESULT) · 48 unmodified lines
4949 set(NEED_MATH OFF)
5050 else()
5151 set(NEED_MATH ON)
52− list(APPEND CMAKE_REQUIRED_LIBRARIES m)
52+ list(APPEND CMAKE_REQUIRED_LIBRARIES m)
5353 endif()
5454 check_symbol_exists(lrint math.h HAVE_LRINT)
5555 check_symbol_exists(lrintf math.h HAVE_LRINTF)
@@ -103,7 +103,7 @@ endif() · 47 unmodified lines
103103
104104 target_include_directories(samplerate PUBLIC
105105 ${PROJECT_SOURCE_DIR}/src
106− ${CMAKE_CURRENT_BINARY_DIR})
106+ ${CMAKE_CURRENT_BINARY_DIR})
107107
108108 if(NEED_MATH)
109109 target_link_libraries(samplerate PUBLIC m)
@@ -111,64 +111,63 @@ endif() · 1 unmodified line
111111
112112 if(LIBSAMPLERATE_TESTS)
113113
114− enable_testing()
114+ enable_testing()
115115
116−file(GLOB TEST_SRCS ${PROJECT_SOURCE_DIR}/tests/*_test.c)
116+ file(GLOB TEST_SRCS ${PROJECT_SOURCE_DIR}/tests/*_test.c)
117117
118−foreach(testSrc ${TEST_SRCS})
119− get_filename_component(testName ${testSrc} NAME_WE)
120− add_executable(${testName}
121− ${testSrc}
122− ${PROJECT_SOURCE_DIR}/tests/util.c
123− ${PROJECT_SOURCE_DIR}/tests/calc_snr.c)
118+ foreach(testSrc ${TEST_SRCS})
119+ get_filename_component(testName ${testSrc} NAME_WE)
120+ add_executable(${testName}
121+ ${testSrc}
122+ ${PROJECT_SOURCE_DIR}/tests/util.c
123+ ${PROJECT_SOURCE_DIR}/tests/calc_snr.c)
124124 target_link_libraries(${testName} PUBLIC samplerate)
125− if(FFTW_FOUND)
126− target_link_libraries(${testName} PUBLIC ${FFTW_LIBRARY})
127−endif()
128− add_test(NAME ${testName} COMMAND ${testName})
129−endforeach(testSrc)
125+ if(FFTW_FOUND)
126+ target_link_libraries(${testName} PUBLIC ${FFTW_LIBRARY})
127+ endif()
128+ add_test(NAME ${testName} COMMAND ${testName})
129+ endforeach(testSrc)
130130 endif()
131131
132132 if(LIBSAMPLERATE_EXAMPLES)
133−set(EXAMPLE_SRCS
134− ${PROJECT_SOURCE_DIR}/examples/timewarp-file.c
135− ${PROJECT_SOURCE_DIR}/examples/varispeed-play.c)
136−
137−foreach(exampleSrc ${EXAMPLE_SRCS})
138− get_filename_component(exampleName ${exampleSrc} NAME_WE)
139− add_executable(${exampleName}
140− ${exampleSrc}
141− ${PROJECT_SOURCE_DIR}/examples/audio_out.c)
133+ set(EXAMPLE_SRCS
134+ ${PROJECT_SOURCE_DIR}/examples/timewarp-file.c
135+ ${PROJECT_SOURCE_DIR}/examples/varispeed-play.c)
136+
137+ foreach(exampleSrc ${EXAMPLE_SRCS})
138+ get_filename_component(exampleName ${exampleSrc} NAME_WE)
139+ add_executable(${exampleName}
140+ ${exampleSrc}
141+ ${PROJECT_SOURCE_DIR}/examples/audio_out.c)
142142 target_link_libraries(${exampleName} PUBLIC samplerate)
143− if(ALSA_FOUND)
144− target_link_libraries(${exampleName} PUBLIC ${ALSA_LIBRARY})
145− endif()
146− if(SNDFILE_FOUND)
147− target_link_libraries(${exampleName} PUBLIC ${SNDFILE_LIBRARY})
148− endif()
149− if(WIN32)
150− target_link_libraries(${exampleName} PUBLIC winmm)
151− endif()
152− if (APPLE)
153− target_link_libraries (${exampleName} PUBLIC "-framework CoreAudio")
154− endif()
155−endforeach(exampleSrc)
143+ if(ALSA_FOUND)
144+ target_link_libraries(${exampleName} PUBLIC ${ALSA_LIBRARY})
145+ endif()
146+ if(SNDFILE_FOUND)
147+ target_link_libraries(${exampleName} PUBLIC ${SNDFILE_LIBRARY})
148+ endif()
149+ if(WIN32)
150+ target_link_libraries(${exampleName} PUBLIC winmm)
151+ endif()
152+ if (APPLE)
153+ target_link_libraries (${exampleName} PUBLIC "-framework CoreAudio")
154+ endif()
155+ endforeach(exampleSrc)
156156 endif()
157157
158158 if(LIBSAMPLERATE_INSTALL)
159− set(prefix ${CMAKE_INSTALL_PREFIX})
160− set(exec_prefix "\${prefix}")
161− set(includedir "\${prefix}/include")
162− set(libdir "\${exec_prefix}/lib")
163− set(VERSION "${PROJECT_VERSION}")
164− if(NEED_MATH)
165− set(LIBS "-lm")
166− endif()
167− configure_file(samplerate.pc.in samplerate.pc @ONLY)
168−
169− install(TARGETS samplerate DESTINATION lib)
170− install(FILES src/samplerate.h DESTINATION include)
171− install(DIRECTORY doc/ DESTINATION share/doc/libsamplerate)
172− install(FILES ${CMAKE_BINARY_DIR}/samplerate.pc DESTINATION lib/pkgconfig)
159+ set(prefix ${CMAKE_INSTALL_PREFIX})
160+ set(exec_prefix "\${prefix}")
161+ set(includedir "\${prefix}/include")
162+ set(libdir "\${exec_prefix}/lib")
163+ set(VERSION "${PROJECT_VERSION}")
164+ if(NEED_MATH)
165+ set(LIBS "-lm")
166+ endif()
167+ configure_file(samplerate.pc.in samplerate.pc @ONLY)
173168
169+ install(TARGETS samplerate DESTINATION lib)
170+ install(FILES src/samplerate.h DESTINATION include)
171+ install(DIRECTORY doc/ DESTINATION share/doc/libsamplerate)
172+ install(FILES ${CMAKE_BINARY_DIR}/samplerate.pc DESTINATION lib/pkgconfig)
174173 endif()

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t