aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-06-05 23:07:33 -0700
committerChris Robinson <[email protected]>2013-06-05 23:07:33 -0700
commitdcefeac6e6afd5c21e0e463c6f780f14ea8eeab5 (patch)
tree76d4cc55a3f1ac1fd5406ca17fba268c18ee4f74 /CMakeLists.txt
parent9fd87314800f27d626f25688a69587166a809dd0 (diff)
Use a static lib for the common example code
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