aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt22
1 files changed, 10 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a33b3b10..07aa66d7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -866,22 +866,20 @@ ENDIF()
IF(ALSOFT_EXAMPLES)
IF(SDL_FOUND AND SDL_SOUND_FOUND)
- ADD_EXECUTABLE(alstream examples/common/alhelpers.c
- examples/common/sdl_sound.c
- examples/alstream.c)
- TARGET_LINK_LIBRARIES(alstream ${SDL_SOUND_LIBRARIES} ${LIBNAME})
+ ADD_LIBRARY(ex-common STATIC examples/common/alhelpers.c
+ examples/common/sdl_sound.c)
+ SET_TARGET_PROPERTIES(ex-common PROPERTIES INCLUDE_DIRECTORIES "${SDL_SOUND_INCLUDE_DIR}")
+
+ ADD_EXECUTABLE(alstream examples/alstream.c)
+ TARGET_LINK_LIBRARIES(alstream ex-common ${SDL_SOUND_LIBRARIES} ${LIBNAME})
SET_TARGET_PROPERTIES(alstream PROPERTIES INCLUDE_DIRECTORIES "${SDL_SOUND_INCLUDE_DIR}")
- ADD_EXECUTABLE(alreverb examples/common/alhelpers.c
- examples/common/sdl_sound.c
- examples/alreverb.c)
- TARGET_LINK_LIBRARIES(alreverb ${SDL_SOUND_LIBRARIES} ${LIBNAME})
+ ADD_EXECUTABLE(alreverb examples/alreverb.c)
+ TARGET_LINK_LIBRARIES(alreverb ex-common ${SDL_SOUND_LIBRARIES} ${LIBNAME})
SET_TARGET_PROPERTIES(alreverb PROPERTIES INCLUDE_DIRECTORIES "${SDL_SOUND_INCLUDE_DIR}")
- ADD_EXECUTABLE(allatency examples/common/alhelpers.c
- examples/common/sdl_sound.c
- examples/allatency.c)
- TARGET_LINK_LIBRARIES(allatency ${SDL_SOUND_LIBRARIES} ${LIBNAME})
+ ADD_EXECUTABLE(allatency examples/allatency.c)
+ TARGET_LINK_LIBRARIES(allatency ex-common ${SDL_SOUND_LIBRARIES} ${LIBNAME})
SET_TARGET_PROPERTIES(allatency PROPERTIES INCLUDE_DIRECTORIES "${SDL_SOUND_INCLUDE_DIR}")
INSTALL(TARGETS alstream alreverb allatency