[openal-soft] Revert #12047 (#12318)

* [openal-soft] Revert #12047

* [openal-soft] Prevent addition of extra Windows SDK

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
This commit is contained in:
Adam Johnson 2020-07-13 14:00:26 -04:00 committed by GitHub
parent 4953c8a3c0
commit 006a133d39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 69 additions and 4 deletions

View File

@ -1,5 +1,6 @@
Source: openal-soft
Version: 1.20.1-2
Version: 1.20.1
Port-Version: 4
Homepage: https://github.com/kcat/openal-soft
Description: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API.
Supports: !uwp

View File

@ -0,0 +1,63 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 98f9ad49..50b4297f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1193,6 +1193,7 @@ SET_TARGET_PROPERTIES(common PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
UNSET(HAS_ROUTER)
SET(IMPL_TARGET OpenAL) # Either OpenAL or soft_oal.
SET(SUBSYS_FLAG )
+SET(COMMON_LIB )
# Build main library
IF(LIBTYPE STREQUAL "STATIC")
@@ -1203,12 +1204,15 @@ IF(LIBTYPE STREQUAL "STATIC")
ADD_LIBRARY(${IMPL_TARGET} STATIC ${COMMON_OBJS} ${OPENAL_OBJS} ${ALC_OBJS})
TARGET_LINK_LIBRARIES(${IMPL_TARGET} PRIVATE ${LINKER_FLAGS} ${EXTRA_LIBS} ${MATH_LIB})
ELSE()
+ SET(COMMON_LIB common)
+
IF(WIN32)
IF(MSVC)
SET(SUBSYS_FLAG ${SUBSYS_FLAG} "/SUBSYSTEM:WINDOWS")
ELSEIF(CMAKE_COMPILER_IS_GNUCC)
SET(SUBSYS_FLAG ${SUBSYS_FLAG} "-mwindows")
ENDIF()
+ set(COMMON_LIB ${COMMON_LIB} shell32 ole32)
ENDIF()
SET(RC_CONFIG resources/openal32.rc)
@@ -1223,7 +1227,7 @@ ELSE()
TARGET_COMPILE_DEFINITIONS(OpenAL
PRIVATE AL_BUILD_LIBRARY AL_ALEXT_PROTOTYPES ${CPP_DEFS})
TARGET_COMPILE_OPTIONS(OpenAL PRIVATE ${C_FLAGS})
- TARGET_LINK_LIBRARIES(OpenAL PRIVATE common ${LINKER_FLAGS})
+ TARGET_LINK_LIBRARIES(OpenAL PRIVATE ${COMMON_LIB} ${LINKER_FLAGS})
TARGET_INCLUDE_DIRECTORIES(OpenAL
PUBLIC
$<BUILD_INTERFACE:${OpenAL_SOURCE_DIR}/include>
@@ -1248,7 +1252,7 @@ ELSE()
IF(WIN32)
SET_TARGET_PROPERTIES(${IMPL_TARGET} PROPERTIES PREFIX "")
ENDIF()
- TARGET_LINK_LIBRARIES(${IMPL_TARGET} PRIVATE common ${LINKER_FLAGS} ${EXTRA_LIBS} ${MATH_LIB})
+ TARGET_LINK_LIBRARIES(${IMPL_TARGET} PRIVATE ${COMMON_LIB} ${LINKER_FLAGS} ${EXTRA_LIBS} ${MATH_LIB})
ENDIF()
TARGET_INCLUDE_DIRECTORIES(${IMPL_TARGET}
diff --git a/native-tools/CMakeLists.txt b/native-tools/CMakeLists.txt
index 5e816bba..5d7919f6 100644
--- a/native-tools/CMakeLists.txt
+++ b/native-tools/CMakeLists.txt
@@ -24,6 +24,11 @@ set_target_properties(bsincgen PROPERTIES OUTPUT_NAME bsincgen)
set_target_properties(bsincgen PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}")
set_target_properties(bsincgen PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}")
target_compile_definitions(bsincgen PRIVATE ${CPP_DEFS})
+set(BSINCGEN_LIB )
if(HAVE_LIBM)
- target_link_libraries(bsincgen m)
+ set(BSINCGEN_LIB ${BSINCGEN_LIB} m)
endif(HAVE_LIBM)
+if(WIN32)
+ set(BSINCGEN_LIB ${BSINCGEN_LIB} shell32)
+endif()
+target_link_libraries(bsincgen ${BSINCGEN_LIB})

View File

@ -3,11 +3,12 @@ vcpkg_fail_port_install(ON_TARGET "UWP")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO kcat/openal-soft
REF a01dbeb09f0a6cdb1f2946b9fdf6c16c8b979066
SHA512 cf59e0150861a428dec0764f4479fa80ae64dc75e3367b577902616d77509de8ae906633713bc509596b18435d19ec323e77592ef01f79cfc1a1706016550993
REF f5e0eef34db3a3ab94b61a2f99f84f078ba947e7 # openal-soft-1.20.1
SHA512 3b05e67406e594215bc5a5e684feafa05ae3b6c898f5b91ab923c59688d7bc4f37f7a9f3bbc8ae252f8997d2588dc2766f44866eb095f0f53cb42030596d26a5
HEAD_REF master
PATCHES
dont-export-symbols-in-static-build.patch
fix-arm-builds.patch
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
@ -56,6 +57,7 @@ vcpkg_configure_cmake(
-DALSOFT_REQUIRE_DSOUND=${ALSOFT_REQUIRE_WINDOWS}
-DALSOFT_REQUIRE_MMDEVAPI=${ALSOFT_REQUIRE_WINDOWS}
-DALSOFT_CPUEXT_NEON=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_WindowsSDK=ON
)
vcpkg_install_cmake()
@ -72,7 +74,6 @@ foreach(HEADER al.h alc.h)
endforeach()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})