Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 15 additions & 31 deletions ports/libopenmpt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,11 @@ endif()

find_package(ZLIB REQUIRED)

find_path(MPG123_INCLUDE_DIR NAMES mpg123.h)
find_library(MPG123_LIBRARY NAMES mpg123 libmpg123)
find_package(MPG123 REQUIRED)
find_package(Vorbis REQUIRED)
find_package(FLAC REQUIRED)

find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
find_path(OGG_INCLUDE_DIR ogg/ogg.h)

find_library(OGG_LIBRARY NAMES ogg)
find_library(VORBIS_LIBRARY NAMES vorbis)
find_library(VORBISFILE_LIBRARY NAMES vorbisfile)

find_path(FLAC_INCLUDE_DIR FLAC/all.h)
find_library(FLAC_LIBRARY NAMES FLAC flac)

find_path(PORTAUDIO_INCLUDE_DIR NAMES portaudio.h)
find_library(PORTAUDIO_LIBRARY NAMES portaudio)
find_package(portaudio REQUIRED)

set(
lib_headers
Expand All @@ -52,11 +42,6 @@ include_directories(
sounddsp
soundlib
openmpt123
${MPG123_INCLUDE_DIR}
${VORBIS_INCLUDE_DIR}
${OGG_INCLUDE_DIR}
${FLAC_INCLUDE_DIR}
${PORTAUDIO_INCLUDE_DIR}
)

set(
Expand Down Expand Up @@ -242,28 +227,27 @@ endif()
target_link_libraries(
libopenmpt
PRIVATE
${OGG_LIBRARY}
${MPG123_LIBRARY}
${VORBISFILE_LIBRARY}
${VORBIS_LIBRARY}
${VORBISFILE_LIBRARY}
MPG123::libmpg123
Vorbis::vorbisfile
FLAC::FLAC
ZLIB::ZLIB
)

if(BUILD_SHARED_LIBS)
set(PORTAUDIO_TARGET portaudio)
else()
set(PORTAUDIO_TARGET portaudio_static)
endif()

target_link_libraries(
openmpt123
PRIVATE
libopenmpt
${OGG_LIBRARY}
${MPG123_LIBRARY}
${VORBISFILE_LIBRARY}
${VORBIS_LIBRARY}
${VORBISFILE_LIBRARY}
${FLAC_LIBRARY}
${PORTAUDIO_LIBRARY}
Winmm
ZLIB::ZLIB
${PORTAUDIO_TARGET}
)

install(
TARGETS libopenmpt
RUNTIME DESTINATION bin
Expand Down
2 changes: 1 addition & 1 deletion ports/libopenmpt/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libopenmpt",
"version-string": "2017-01-28-cf2390140",
"port-version": 1,
"port-version": 2,
"description": "a library to render tracker music",
"homepage": "https://github.com/OpenMPT/openmpt",
"supports": "!uwp",
Expand Down
13 changes: 13 additions & 0 deletions ports/mpg123/0001-fix-checkcpuarch-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/ports/cmake/cmake/CheckCPUArch.cmake b/ports/cmake/cmake/CheckCPUArch.cmake
index 84dab8a..925aa09 100644
--- a/ports/cmake/cmake/CheckCPUArch.cmake
+++ b/ports/cmake/cmake/CheckCPUArch.cmake
@@ -2,7 +2,7 @@ macro(_CHECK_CPU_ARCH ARCH ARCH_DEFINES VARIABLE)
if(NOT DEFINED HAVE_${VARIABLE})
message(STATUS "Check CPU architecture is ${ARCH}")
set(CHECK_CPU_ARCH_DEFINES ${ARCH_DEFINES})
- configure_file(${PROJECT_SOURCE_DIR}/CheckCPUArch.c.in ${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckCPUArch.c @ONLY)
+ configure_file(${PROJECT_SOURCE_DIR}/cmake/CheckCPUArch.c.in ${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckCPUArch.c @ONLY)
try_compile(HAVE_${VARIABLE} "${PROJECT_BINARY_DIR}"
"${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckCPUArch.c")
if(HAVE_${VARIABLE})
37 changes: 0 additions & 37 deletions ports/mpg123/0001-fix-x86-build.patch

This file was deleted.

21 changes: 21 additions & 0 deletions ports/mpg123/0002-fix-libmpg123-uwp-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/ports/cmake/src/CMakeLists.txt b/ports/cmake/src/CMakeLists.txt
index b843152..b8ff89b 100644
--- a/ports/cmake/src/CMakeLists.txt
+++ b/ports/cmake/src/CMakeLists.txt
@@ -39,8 +39,6 @@ check_include_file("termios.h" HAVE_TERMIOS)
check_include_file("unistd.h" HAVE_UNISTD_H)
check_include_file("windows.h" HAVE_WINDOWS_H)

-check_symbol_exists(strerror "string.h" HAVE_STRERROR)
-
function(check_m)
set(CMAKE_REQUIRED_LIBRARIES m)
check_function_exists(sin HAVE_M)
@@ -59,6 +57,7 @@ check_function_exists(shmget HAVE_SHMGET)
check_function_exists(shmat HAVE_SHMAT)
check_function_exists(shmdt HAVE_SHMDT)
check_function_exists(shmctl HAVE_SHMCTL)
+check_function_exists(strerror HAVE_STRERROR)

search_libs(gethostbyname GETHOSTBYNAME_LIB nsl socket network)
search_libs(socket SOCKET_LIB socket)
Loading