Skip to content

Commit 8a8bcc6

Browse files
committed
add -pthread, fix link order
1 parent 533b161 commit 8a8bcc6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ pkg_check_modules(REQ glib-2.0 alsa REQUIRED)
1010
# enable tracing for Debug builds
1111
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DWITH_TRACE")
1212

13+
# link with pthread
14+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
15+
1316
include_directories(${REQ_INCLUDE_DIRS})
1417

1518
set(USE_BUNDLED_PULSEAUDIO_HEADERS 1 CACHE BOOLEAN "Use bundled PulseAudio headers instead of system ones")
@@ -53,9 +56,9 @@ set_target_properties(pulse-simple PROPERTIES VERSION 0)
5356

5457
set(SYMBOLMAP "-Wl,-version-script=\"${CMAKE_SOURCE_DIR}/src/symbolmap\"")
5558

56-
target_link_libraries(pulse ${SYMBOLMAP} ${REQ_LIBRARIES} trace-helper)
57-
target_link_libraries(pulse-simple ${SYMBOLMAP} ${REQ_LIBRARIES} trace-helper)
58-
target_link_libraries(pulsecommon-5.0 ${SYMBOLMAP} ${REQ_LIBRARIES} trace-helper)
59+
target_link_libraries(pulse ${SYMBOLMAP} trace-helper ${REQ_LIBRARIES})
60+
target_link_libraries(pulse-simple ${SYMBOLMAP} trace-helper ${REQ_LIBRARIES})
61+
target_link_libraries(pulsecommon-5.0 ${SYMBOLMAP} trace-helper ${REQ_LIBRARIES})
5962

6063
add_subdirectory(tests)
6164

0 commit comments

Comments
 (0)