vcpkg/ports/mpg123/portfile.cmake

60 строки
2.1 KiB
CMake
Исходник Обычный вид История

2016-10-27 03:11:59 +03:00
include(${CMAKE_TRIPLET_FILE})
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
message(FATAL_ERROR "Static building not supported yet")
endif()
2016-09-19 06:50:08 +03:00
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpg123-1.23.3)
2016-09-19 06:50:08 +03: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 06:50:08 +03:00
FILENAME "mpg123-1.23.3.tar.bz2"
2016-09-22 23:13:09 +03:00
SHA512 a5ebfb36223a3966386bc8e5769b8543861872d20f9de037d07857e857000f20e198e0b1db04bdc56b18b19d5b4027d8261a104af0216d6ea45274b21a18dda4
2016-09-19 06:50:08 +03: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 06:50:08 +03: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 06:50:08 +03: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 06:50:08 +03: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 06:50:08 +03:00
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
)
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Debug/libmpg123.lib
2016-09-19 06:50:08 +03:00
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
)
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/2010/libmpg123/Release/libmpg123.lib
2016-09-19 06:50:08 +03:00
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
)
file(INSTALL
${SOURCE_PATH}/ports/MSVC++/mpg123.h
2016-09-19 06:50:08 +03:00
DESTINATION ${CURRENT_PACKAGES_DIR}/include
)
file(INSTALL
${SOURCE_PATH}/src/libmpg123/mpg123.h.in
2016-09-19 06:50:08 +03:00
DESTINATION ${CURRENT_PACKAGES_DIR}/include
)
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpg123 RENAME copyright)
2016-09-19 06:50:08 +03:00
vcpkg_copy_pdbs()
message(STATUS "Installing done")