2017-01-06 06:39:00 +08:00
|
|
|
include(vcpkg_common_functions)
|
2019-08-02 08:54:45 +08:00
|
|
|
|
2017-01-06 06:39:00 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
|
|
|
URLS "https://sourceforge.net/projects/qwt/files/qwt/6.1.3/qwt-6.1.3.zip"
|
|
|
|
FILENAME "qwt-6.1.3.zip"
|
|
|
|
SHA512 8f249e23d50f71d14fca37776ea40d8d6931db14d9602e03a343bfb7a9bf55502202103135b77f583c3890a7924220e8a142a01c448dbde311860d89a3b10fc8
|
|
|
|
)
|
|
|
|
|
2019-08-02 08:54:45 +08:00
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
PATCHES fix-dynamic-static.patch
|
|
|
|
)
|
2017-01-06 06:39:00 +08:00
|
|
|
|
2017-12-31 07:12:22 +08:00
|
|
|
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
|
|
|
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
|
|
|
|
2019-08-02 08:54:45 +08:00
|
|
|
vcpkg_configure_qmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS
|
|
|
|
CONFIG+=${VCPKG_LIBRARY_LINKAGE}
|
|
|
|
)
|
2017-12-31 07:12:22 +08:00
|
|
|
|
2018-01-18 23:36:07 +08:00
|
|
|
vcpkg_build_qmake(
|
|
|
|
RELEASE_TARGETS sub-src-release_ordered
|
|
|
|
DEBUG_TARGETS sub-src-debug_ordered
|
2017-01-06 06:39:00 +08:00
|
|
|
)
|
|
|
|
|
2017-12-31 07:12:22 +08:00
|
|
|
#Set the correct install directory to packages
|
|
|
|
foreach(MAKEFILE ${RELEASE_MAKEFILES} ${DEBUG_MAKEFILES})
|
|
|
|
vcpkg_replace_string(${MAKEFILE} "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}")
|
|
|
|
endforeach()
|
2017-01-06 06:39:00 +08:00
|
|
|
|
2017-12-31 07:12:22 +08:00
|
|
|
#Install the header files
|
2017-01-06 06:39:00 +08:00
|
|
|
file(GLOB HEADER_FILES ${SOURCE_PATH}/src/*.h)
|
2017-04-17 01:32:12 +08:00
|
|
|
file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/qwt)
|
2017-01-06 06:39:00 +08:00
|
|
|
|
2017-12-31 07:12:22 +08:00
|
|
|
#Install the module files
|
2017-01-06 06:39:00 +08:00
|
|
|
file(INSTALL
|
2017-12-31 07:12:22 +08:00
|
|
|
${RELEASE_DIR}/lib/qwt.lib
|
2017-01-06 06:39:00 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
|
|
|
|
)
|
|
|
|
|
|
|
|
file(INSTALL
|
2017-12-31 07:12:22 +08:00
|
|
|
${DEBUG_DIR}/lib/qwtd.lib
|
2017-01-06 06:39:00 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
|
|
|
|
)
|
|
|
|
|
2018-01-18 23:36:07 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
2017-01-06 06:39:00 +08:00
|
|
|
file(INSTALL
|
2017-12-31 07:12:22 +08:00
|
|
|
${RELEASE_DIR}/lib/qwt.dll
|
2017-01-06 06:39:00 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
|
|
|
|
)
|
|
|
|
|
|
|
|
file(INSTALL
|
2017-12-31 07:12:22 +08:00
|
|
|
${DEBUG_DIR}/lib/qwtd.dll
|
2017-01-06 06:39:00 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2018-01-18 23:36:07 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2017-01-06 06:39:00 +08:00
|
|
|
# Handle copyright
|
|
|
|
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/qwt)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/qwt/COPYING ${CURRENT_PACKAGES_DIR}/share/qwt/copyright)
|