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
49 set(NEED_MATH OFF)49 set(NEED_MATH OFF)
50else()50else()
51 set(NEED_MATH ON)51 set(NEED_MATH ON)
52 list(APPEND CMAKE_REQUIRED_LIBRARIES m)52 list(APPEND CMAKE_REQUIRED_LIBRARIES m)
53endif()53endif()
54check_symbol_exists(lrint math.h HAVE_LRINT)54check_symbol_exists(lrint math.h HAVE_LRINT)
55check_symbol_exists(lrintf math.h HAVE_LRINTF)55check_symbol_exists(lrintf math.h HAVE_LRINTF)
@@ -103,7 +103,7 @@ endif() · 47 unmodified lines
103 103
104target_include_directories(samplerate PUBLIC104target_include_directories(samplerate PUBLIC
105 ${PROJECT_SOURCE_DIR}/src105 ${PROJECT_SOURCE_DIR}/src
106 ${CMAKE_CURRENT_BINARY_DIR})106 ${CMAKE_CURRENT_BINARY_DIR})
107 107
108if(NEED_MATH)108if(NEED_MATH)
109 target_link_libraries(samplerate PUBLIC m)109 target_link_libraries(samplerate PUBLIC m)
@@ -111,64 +111,63 @@ endif() · 1 unmodified line
111 111
112if(LIBSAMPLERATE_TESTS)112if(LIBSAMPLERATE_TESTS)
113 113
114 enable_testing()114 enable_testing()
115 115
116file(GLOB TEST_SRCS ${PROJECT_SOURCE_DIR}/tests/*_test.c)116 file(GLOB TEST_SRCS ${PROJECT_SOURCE_DIR}/tests/*_test.c)
117 117
118foreach(testSrc ${TEST_SRCS})118 foreach(testSrc ${TEST_SRCS})
119 get_filename_component(testName ${testSrc} NAME_WE)119 get_filename_component(testName ${testSrc} NAME_WE)
120 add_executable(${testName}120 add_executable(${testName}
121 ${testSrc}121 ${testSrc}
122 ${PROJECT_SOURCE_DIR}/tests/util.c122 ${PROJECT_SOURCE_DIR}/tests/util.c
123 ${PROJECT_SOURCE_DIR}/tests/calc_snr.c)123 ${PROJECT_SOURCE_DIR}/tests/calc_snr.c)
124 target_link_libraries(${testName} PUBLIC samplerate)124 target_link_libraries(${testName} PUBLIC samplerate)
125 if(FFTW_FOUND)125 if(FFTW_FOUND)
126 target_link_libraries(${testName} PUBLIC ${FFTW_LIBRARY})126 target_link_libraries(${testName} PUBLIC ${FFTW_LIBRARY})
127endif() 127 endif()
128 add_test(NAME ${testName} COMMAND ${testName})128 add_test(NAME ${testName} COMMAND ${testName})
129endforeach(testSrc)129 endforeach(testSrc)
130endif()130endif()
131 131
132if(LIBSAMPLERATE_EXAMPLES)132if(LIBSAMPLERATE_EXAMPLES)
133set(EXAMPLE_SRCS133 set(EXAMPLE_SRCS
134 ${PROJECT_SOURCE_DIR}/examples/timewarp-file.c134 ${PROJECT_SOURCE_DIR}/examples/timewarp-file.c
135 ${PROJECT_SOURCE_DIR}/examples/varispeed-play.c)135 ${PROJECT_SOURCE_DIR}/examples/varispeed-play.c)
136 136
137foreach(exampleSrc ${EXAMPLE_SRCS})137 foreach(exampleSrc ${EXAMPLE_SRCS})
138 get_filename_component(exampleName ${exampleSrc} NAME_WE)138 get_filename_component(exampleName ${exampleSrc} NAME_WE)
139 add_executable(${exampleName}139 add_executable(${exampleName}
140 ${exampleSrc}140 ${exampleSrc}
141 ${PROJECT_SOURCE_DIR}/examples/audio_out.c)141 ${PROJECT_SOURCE_DIR}/examples/audio_out.c)
142 target_link_libraries(${exampleName} PUBLIC samplerate)142 target_link_libraries(${exampleName} PUBLIC samplerate)
143 if(ALSA_FOUND)143 if(ALSA_FOUND)
144 target_link_libraries(${exampleName} PUBLIC ${ALSA_LIBRARY})144 target_link_libraries(${exampleName} PUBLIC ${ALSA_LIBRARY})
145 endif()145 endif()
146 if(SNDFILE_FOUND)146 if(SNDFILE_FOUND)
147 target_link_libraries(${exampleName} PUBLIC ${SNDFILE_LIBRARY})147 target_link_libraries(${exampleName} PUBLIC ${SNDFILE_LIBRARY})
148 endif()148 endif()
149 if(WIN32)149 if(WIN32)
150 target_link_libraries(${exampleName} PUBLIC winmm)150 target_link_libraries(${exampleName} PUBLIC winmm)
151 endif()151 endif()
152 if (APPLE)152 if (APPLE)
153 target_link_libraries (${exampleName} PUBLIC "-framework CoreAudio")153 target_link_libraries (${exampleName} PUBLIC "-framework CoreAudio")
154 endif()154 endif()
155endforeach(exampleSrc)155 endforeach(exampleSrc)
156endif() 156endif()
157 157
158if(LIBSAMPLERATE_INSTALL)158if(LIBSAMPLERATE_INSTALL)
159 set(prefix ${CMAKE_INSTALL_PREFIX})159 set(prefix ${CMAKE_INSTALL_PREFIX})
160 set(exec_prefix "\${prefix}")160 set(exec_prefix "\${prefix}")
161 set(includedir "\${prefix}/include")161 set(includedir "\${prefix}/include")
162 set(libdir "\${exec_prefix}/lib")162 set(libdir "\${exec_prefix}/lib")
163 set(VERSION "${PROJECT_VERSION}")163 set(VERSION "${PROJECT_VERSION}")
164 if(NEED_MATH)164 if(NEED_MATH)
165 set(LIBS "-lm")165 set(LIBS "-lm")
166 endif()166 endif()
167 configure_file(samplerate.pc.in samplerate.pc @ONLY)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)
173 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)
174endif()173endif()

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