Skip to content

Commit

Permalink
[qwt]make qwt support unix (microsoft#8030)
Browse files Browse the repository at this point in the history
* make qwt support unix

* [qwt] Bump CONTROL version
  • Loading branch information
longhuan2018 authored and vicroms committed Sep 9, 2019
1 parent d30e775 commit 43fea7c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 27 deletions.
2 changes: 1 addition & 1 deletion ports/qwt/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: qwt
Version: 6.1.3-7
Version: 6.1.3-8
Homepage: https://sourceforge.net/projects/qwt
Description: Qt widgets library for technical applications
Build-Depends: qt5-base, qt5-svg, qt5-tools
50 changes: 24 additions & 26 deletions ports/qwt/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,17 @@ vcpkg_configure_qmake(
CONFIG+=${VCPKG_LIBRARY_LINKAGE}
)

vcpkg_build_qmake(
RELEASE_TARGETS sub-src-release_ordered
DEBUG_TARGETS sub-src-debug_ordered
)
if (CMAKE_HOST_WIN32)
vcpkg_build_qmake(
RELEASE_TARGETS sub-src-release_ordered
DEBUG_TARGETS sub-src-debug_ordered
)
elseif (CMAKE_HOST_UNIX OR CMAKE_HOST_APPLE) # Build in UNIX
vcpkg_build_qmake(
RELEASE_TARGETS sub-src-all-ordered
DEBUG_TARGETS sub-src-all-ordered
)
endif()

#Set the correct install directory to packages
foreach(MAKEFILE ${RELEASE_MAKEFILES} ${DEBUG_MAKEFILES})
Expand All @@ -36,30 +43,21 @@ file(GLOB HEADER_FILES ${SOURCE_PATH}/src/*.h)
file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/qwt)

#Install the module files
file(INSTALL
${RELEASE_DIR}/lib/qwt.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
)

file(INSTALL
${DEBUG_DIR}/lib/qwtd.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
file(INSTALL
${RELEASE_DIR}/lib/qwt.dll
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
)

file(INSTALL
${DEBUG_DIR}/lib/qwtd.dll
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
)
if (CMAKE_HOST_WIN32)
file(INSTALL ${RELEASE_DIR}/lib/qwt.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
file(INSTALL ${DEBUG_DIR}/lib/qwtd.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
file(INSTALL ${RELEASE_DIR}/lib/qwt.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
file(INSTALL ${DEBUG_DIR}/lib/qwtd.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
vcpkg_copy_pdbs()
elseif (CMAKE_HOST_UNIX OR CMAKE_HOST_APPLE) # Build in UNIX
file(INSTALL ${RELEASE_DIR}/lib/libqwt.a DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
file(INSTALL ${DEBUG_DIR}/lib/libqwt.a DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()

vcpkg_copy_pdbs()

# 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)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/qwt/COPYING ${CURRENT_PACKAGES_DIR}/share/qwt/copyright)

0 comments on commit 43fea7c

Please sign in to comment.