Apply fixes to OpenAL-soft's CMakeLists.txt.

* Disable utils, examples, config install.
 * Set lib name in parent scope.
 * Add TARGET_INCLUDE_DIRECTORIES
 * Don't install the default stuff.
 * Install our stuff instead.
This commit is contained in:
rude
2014-02-13 22:15:00 +01:00
parent c3a7263a78
commit 9354a856db
@@ -74,12 +74,12 @@ OPTION(ALSOFT_DLOPEN "Check for the dlopen API for loading optional libs" ON)
OPTION(ALSOFT_WERROR "Treat compile warnings as errors" OFF)
OPTION(ALSOFT_UTILS "Build and install utility programs" ON)
OPTION(ALSOFT_UTILS "Build and install utility programs" OFF)
OPTION(ALSOFT_NO_CONFIG_UTIL "Disable building the alsoft-config utility" OFF)
OPTION(ALSOFT_EXAMPLES "Build and install example programs" ON)
OPTION(ALSOFT_EXAMPLES "Build and install example programs" OFF)
OPTION(ALSOFT_CONFIG "Install alsoft.conf sample configuration file" ON)
OPTION(ALSOFT_CONFIG "Install alsoft.conf sample configuration file" OFF)
IF(WIN32)
@@ -95,6 +95,8 @@ IF ("${CMAKE_C_PLATFORM_ID}" STREQUAL "QNX")
SET(EXTRA_LIBS ${EXTRA_LIBS} -L/usr/lib)
ENDIF()
SET(OPENAL_LIB_NAME ${LIBNAME} PARENT_SCOPE)
IF(NOT LIBTYPE)
SET(LIBTYPE SHARED)
ENDIF()
@@ -890,8 +892,10 @@ IF(WIN32 AND NOT LIBTYPE STREQUAL "STATIC")
ENDIF()
TARGET_LINK_LIBRARIES(${LIBNAME} ${EXTRA_LIBS})
TARGET_INCLUDE_DIRECTORIES(${LIBNAME} PUBLIC include)
# Add an install target here
IF(NOT MEGA)
INSTALL(TARGETS ${LIBNAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION "lib${LIB_SUFFIX}"
@@ -907,6 +911,7 @@ INSTALL(FILES include/AL/al.h
)
INSTALL(FILES "${OpenAL_BINARY_DIR}/openal.pc"
DESTINATION "lib${LIB_SUFFIX}/pkgconfig")
ENDIF()
MESSAGE(STATUS "")
@@ -993,3 +998,7 @@ IF(ALSOFT_EXAMPLES)
MESSAGE(STATUS "")
ENDIF()
ENDIF()
IF(MEGA)
install(TARGETS ${LIBNAME} RUNTIME DESTINATION . LIBRARY DESTINATION .)
ENDIF()