vcpkg/ports/mpg123/portfile.cmake

60 lines
2.1 KiB
CMake
Raw Normal View History

2016-10-27 08:11:59 +08:00
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
message(STATUS "Warning: Static building not supported yet. Building dynamic.")
set(VCPKG_LIBRARY_LINKAGE dynamic)
2016-10-27 08:11:59 +08:00
endif()
2016-09-19 11:50:08 +08:00
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpg123-1.23.3)
2016-09-19 11:50:08 +08:00
vcpkg_download_distfile(ARCHIVE
URLS "http://downloads.sourceforge.net/project/mpg123/mpg123/1.23.3/mpg123-1.23.3.tar.bz2"
2016-09-19 11:50:08 +08:00
FILENAME "mpg123-1.23.3.tar.bz2"
2016-09-23 04:13:09 +08:00
SHA512 a5ebfb36223a3966386bc8e5769b8543861872d20f9de037d07857e857000f20e198e0b1db04bdc56b18b19d5b4027d8261a104af0216d6ea45274b21a18dda4
2016-09-19 11:50:08 +08:00
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_find_acquire_program(YASM)
get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)
set(ENV{PATH} "${YASM_EXE_PATH};$ENV{PATH}")
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
2016-09-19 11:50:08 +08:00
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Modify-2010-libmpg123.vcxproj-to-use-VS-2015-along-w.patch
)
vcpkg_build_msbuild(
PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj
2016-09-19 11:50:08 +08:00
RELEASE_CONFIGURATION Release_x86_Dll
DEBUG_CONFIGURATION Debug_x86_Dll
)
message(STATUS "Installing")
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Debug/libmpg123.dll
${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Debug/libmpg123.pdb
2016-09-19 11:50:08 +08:00
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
)
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Release/libmpg123.dll
${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Release/libmpg123.pdb
2016-09-19 11:50:08 +08:00
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
)
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Debug/libmpg123.lib
2016-09-19 11:50:08 +08:00
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
)
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Release/libmpg123.lib
2016-09-19 11:50:08 +08:00
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
)
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/mpg123.h
2016-09-19 11:50:08 +08:00
DESTINATION ${CURRENT_PACKAGES_DIR}/include
)
file(INSTALL
${SOURCE_PATH}/src/libmpg123/mpg123.h.in
2016-09-19 11:50:08 +08:00
DESTINATION ${CURRENT_PACKAGES_DIR}/include
)
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpg123 RENAME copyright)
2016-09-19 11:50:08 +08:00
vcpkg_copy_pdbs()
message(STATUS "Installing done")