From 9354a856dbdef7ccbb5a6ef43e2e31127703123d Mon Sep 17 00:00:00 2001 From: rude Date: Thu, 13 Feb 2014 22:15:00 +0100 Subject: [PATCH] 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. --- .../CMakeLists.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/libs/openal-soft-1.15.1-29e0af5ef052/CMakeLists.txt b/libs/openal-soft-1.15.1-29e0af5ef052/CMakeLists.txt index ff746764..fa3292a9 100644 --- a/libs/openal-soft-1.15.1-29e0af5ef052/CMakeLists.txt +++ b/libs/openal-soft-1.15.1-29e0af5ef052/CMakeLists.txt @@ -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()