aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAaron Jacobs <[email protected]>2015-08-12 15:08:14 -0700
committerAaron Jacobs <[email protected]>2015-08-12 15:08:14 -0700
commit11e6e07a7221c3de14529980bf271a67c3b4a18e (patch)
tree49825a70597971d8161cede05658827a17772278 /CMakeLists.txt
parent8fa4f276f89985be44007ce166109837cbfd5763 (diff)
Make installation of headers and libraries optional
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt71
1 files changed, 40 insertions, 31 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 58582f83..450aa89c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,6 +37,7 @@ OPTION(ALSOFT_EXAMPLES "Build and install example programs" ON)
OPTION(ALSOFT_CONFIG "Install alsoft.conf sample configuration file" ON)
OPTION(ALSOFT_HRTF_DEFS "Install HRTF definition files" ON)
+OPTION(ALSOFT_INSTALL "Install headers and libraries" ON)
IF(WIN32)
@@ -1111,22 +1112,24 @@ ENDIF()
TARGET_LINK_LIBRARIES(${LIBNAME} common ${EXTRA_LIBS})
-# Add an install target here
-INSTALL(TARGETS ${LIBNAME}
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION "lib${LIB_SUFFIX}"
- ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
-)
-INSTALL(FILES include/AL/al.h
- include/AL/alc.h
- include/AL/alext.h
- include/AL/efx.h
- include/AL/efx-creative.h
- include/AL/efx-presets.h
- DESTINATION include/AL
-)
-INSTALL(FILES "${OpenAL_BINARY_DIR}/openal.pc"
- DESTINATION "lib${LIB_SUFFIX}/pkgconfig")
+IF(ALSOFT_INSTALL)
+ # Add an install target here
+ INSTALL(TARGETS ${LIBNAME}
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION "lib${LIB_SUFFIX}"
+ ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
+ )
+ INSTALL(FILES include/AL/al.h
+ include/AL/alc.h
+ include/AL/alext.h
+ include/AL/efx.h
+ include/AL/efx-creative.h
+ include/AL/efx-presets.h
+ DESTINATION include/AL
+ )
+ INSTALL(FILES "${OpenAL_BINARY_DIR}/openal.pc"
+ DESTINATION "lib${LIB_SUFFIX}/pkgconfig")
+ENDIF()
MESSAGE(STATUS "")
@@ -1177,11 +1180,13 @@ IF(ALSOFT_UTILS)
TARGET_LINK_LIBRARIES(makehrtf m)
ENDIF()
- INSTALL(TARGETS openal-info makehrtf
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION "lib${LIB_SUFFIX}"
- ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
- )
+ IF(ALSOFT_INSTALL)
+ INSTALL(TARGETS openal-info makehrtf
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION "lib${LIB_SUFFIX}"
+ ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
+ )
+ ENDIF()
MESSAGE(STATUS "Building utility programs")
IF(TARGET alsoft-config)
@@ -1217,11 +1222,13 @@ IF(ALSOFT_EXAMPLES)
SET_PROPERTY(TARGET alloopback APPEND PROPERTY INCLUDE_DIRECTORIES ${SDL2_INCLUDE_DIR}
${SDL_SOUND_INCLUDE_DIR})
- INSTALL(TARGETS alstream alreverb allatency alloopback
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION "lib${LIB_SUFFIX}"
- ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
- )
+ IF(ALSOFT_INSTALL)
+ INSTALL(TARGETS alstream alreverb allatency alloopback
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION "lib${LIB_SUFFIX}"
+ ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
+ )
+ ENDIF()
SET(FFVER_OK FALSE)
IF(FFMPEG_FOUND)
@@ -1253,11 +1260,13 @@ IF(ALSOFT_EXAMPLES)
SET_PROPERTY(TARGET alffplay APPEND PROPERTY INCLUDE_DIRECTORIES ${SDL2_INCLUDE_DIR}
${FFMPEG_INCLUDE_DIRS})
- INSTALL(TARGETS alffplay
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION "lib${LIB_SUFFIX}"
- ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
- )
+ IF(ALSOFT_INSTALL)
+ INSTALL(TARGETS alffplay
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION "lib${LIB_SUFFIX}"
+ ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
+ )
+ ENDIF()
MESSAGE(STATUS "Building SDL and FFmpeg example programs")
ELSE()
MESSAGE(STATUS "Building SDL example programs")