mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 09:43:02 +08:00
use install target in Makefiles; make all portfile uniform
This commit is contained in:
parent
6b83925dd6
commit
9bb4817e32
@ -31,58 +31,127 @@ endif()
|
||||
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
||||
set(ENV{_CL_} "/utf-8")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
#Store build paths
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
#Find Python and add it to the path
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
#Configure debug
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store debug makefiles path
|
||||
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
|
||||
|
||||
#Fix path to Qt5QmlDevTools
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
|
||||
endforeach()
|
||||
|
||||
#Build debug
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
#Configure release
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store release makefile path
|
||||
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
|
||||
|
||||
#Build release
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
#Fix the cmake files if they exist
|
||||
if(EXISTS ${RELEASE_DIR}/lib/cmake)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
endif()
|
||||
|
||||
#Set the correct install directory to packages
|
||||
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
|
||||
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
|
||||
#Install the module files
|
||||
vcpkg_build_qmake_debug(TARGETS install)
|
||||
vcpkg_build_qmake_release(TARGETS install)
|
||||
|
||||
#Reset the path to the baseline
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
#Remove extra cmake files
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT RELEASE_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT DEBUG_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
#Move release and debug dlls to the correct directory
|
||||
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
|
||||
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll)
|
||||
if (RELEASE_DLLS)
|
||||
file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE ${RELEASE_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*)
|
||||
if(NOT RELEASE_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
endif()
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${DEBUG_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
|
||||
if(NOT DEBUG_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe")
|
||||
file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5)
|
||||
file(REMOVE ${BINARY_TOOLS})
|
||||
file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe")
|
||||
file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5)
|
||||
file(REMOVE ${BINARY_TOOLS})
|
||||
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
|
||||
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "")
|
||||
endif()
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
|
||||
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt53d RENAME copyright)
|
||||
#Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
endif()
|
||||
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
|
@ -31,49 +31,127 @@ endif()
|
||||
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
||||
set(ENV{_CL_} "/utf-8")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
#Store build paths
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
#Find Python and add it to the path
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
#Configure debug
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store debug makefiles path
|
||||
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
|
||||
|
||||
#Fix path to Qt5QmlDevTools
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
|
||||
endforeach()
|
||||
|
||||
#Build debug
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
#Configure release
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store release makefile path
|
||||
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
|
||||
|
||||
#Build release
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
#Fix the cmake files if they exist
|
||||
if(EXISTS ${RELEASE_DIR}/lib/cmake)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
endif()
|
||||
|
||||
#Set the correct install directory to packages
|
||||
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
|
||||
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
|
||||
#Install the module files
|
||||
vcpkg_build_qmake_debug(TARGETS install)
|
||||
vcpkg_build_qmake_release(TARGETS install)
|
||||
|
||||
#Reset the path to the baseline
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
#Remove extra cmake files
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT RELEASE_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT DEBUG_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
#Move release and debug dlls to the correct directory
|
||||
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
|
||||
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll)
|
||||
if (RELEASE_DLLS)
|
||||
file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE ${RELEASE_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*)
|
||||
if(NOT RELEASE_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
endif()
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${DEBUG_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
|
||||
if(NOT DEBUG_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
|
||||
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "")
|
||||
endif()
|
||||
|
||||
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.GPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5charts RENAME copyright)
|
||||
#Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
endif()
|
||||
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
|
@ -31,49 +31,127 @@ endif()
|
||||
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
||||
set(ENV{_CL_} "/utf-8")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
#Store build paths
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
#Find Python and add it to the path
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
#Configure debug
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store debug makefiles path
|
||||
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
|
||||
|
||||
#Fix path to Qt5QmlDevTools
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
|
||||
endforeach()
|
||||
|
||||
#Build debug
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
#Configure release
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store release makefile path
|
||||
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
|
||||
|
||||
#Build release
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
#Fix the cmake files if they exist
|
||||
if(EXISTS ${RELEASE_DIR}/lib/cmake)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
endif()
|
||||
|
||||
#Set the correct install directory to packages
|
||||
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
|
||||
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
|
||||
#Install the module files
|
||||
vcpkg_build_qmake_debug(TARGETS install)
|
||||
vcpkg_build_qmake_release(TARGETS install)
|
||||
|
||||
#Reset the path to the baseline
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
#Remove extra cmake files
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT RELEASE_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT DEBUG_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
#Move release and debug dlls to the correct directory
|
||||
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
|
||||
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll)
|
||||
if (RELEASE_DLLS)
|
||||
file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE ${RELEASE_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*)
|
||||
if(NOT RELEASE_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
endif()
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${DEBUG_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
|
||||
if(NOT DEBUG_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
|
||||
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "")
|
||||
endif()
|
||||
|
||||
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.GPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5datavisualization3d RENAME copyright)
|
||||
#Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
endif()
|
||||
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
|
@ -31,57 +31,130 @@ endif()
|
||||
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
||||
set(ENV{_CL_} "/utf-8")
|
||||
|
||||
#Store build paths
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
#Find Python and add it to the path
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
#Configure debug
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store debug makefiles path
|
||||
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
|
||||
|
||||
#Fix path to Qt5QmlDevTools
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
|
||||
endforeach()
|
||||
|
||||
#Build debug
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
#Configure release
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store release makefile path
|
||||
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
|
||||
|
||||
#Build release
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
#Fix the cmake files if they exist
|
||||
if(EXISTS ${RELEASE_DIR}/lib/cmake)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
endif()
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
#Set the correct install directory to packages
|
||||
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
|
||||
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
|
||||
#Install the module files
|
||||
vcpkg_build_qmake_debug(TARGETS install)
|
||||
vcpkg_build_qmake_release(TARGETS install)
|
||||
|
||||
#Reset the path to the baseline
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/*.exe")
|
||||
file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5)
|
||||
file(REMOVE ${BINARY_TOOLS})
|
||||
file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/*.exe")
|
||||
file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5)
|
||||
file(REMOVE ${BINARY_TOOLS})
|
||||
#Remove extra cmake files
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT RELEASE_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT DEBUG_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
#Move release and debug dlls to the correct directory
|
||||
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
|
||||
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll)
|
||||
if (RELEASE_DLLS)
|
||||
file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE ${RELEASE_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*)
|
||||
if(NOT RELEASE_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
endif()
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${DEBUG_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
|
||||
if(NOT DEBUG_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
|
||||
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "")
|
||||
endif()
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
endif()
|
||||
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
|
||||
|
||||
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5declarative RENAME copyright)
|
||||
#Fix incorrectly placed file(s)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Qt5QmlDevToolsd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5QmlDevToolsd.lib)
|
@ -31,51 +31,127 @@ endif()
|
||||
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
||||
set(ENV{_CL_} "/utf-8")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
#Store build paths
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
#Find Python and add it to the path
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
#Configure debug
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store debug makefiles path
|
||||
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
|
||||
|
||||
#Fix path to Qt5QmlDevTools
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
|
||||
endforeach()
|
||||
|
||||
#Build debug
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
#Configure release
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store release makefile path
|
||||
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
|
||||
|
||||
#Build release
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
#Fix the cmake files if they exist
|
||||
if(EXISTS ${RELEASE_DIR}/lib/cmake)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
endif()
|
||||
|
||||
#Set the correct install directory to packages
|
||||
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
|
||||
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
|
||||
#Install the module files
|
||||
vcpkg_build_qmake_debug(TARGETS install)
|
||||
vcpkg_build_qmake_release(TARGETS install)
|
||||
|
||||
#Reset the path to the baseline
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
#Remove extra cmake files
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT RELEASE_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT DEBUG_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
#Move release and debug dlls to the correct directory
|
||||
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
|
||||
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll)
|
||||
if (RELEASE_DLLS)
|
||||
file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE ${RELEASE_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*)
|
||||
if(NOT RELEASE_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
endif()
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${DEBUG_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
|
||||
if(NOT DEBUG_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
|
||||
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "")
|
||||
endif()
|
||||
|
||||
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5gamepad RENAME copyright)
|
||||
#Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
endif()
|
||||
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
|
@ -31,43 +31,127 @@ endif()
|
||||
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
||||
set(ENV{_CL_} "/utf-8")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
#Store build paths
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
#Find Python and add it to the path
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
#Configure debug
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store debug makefiles path
|
||||
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
|
||||
|
||||
#Fix path to Qt5QmlDevTools
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
|
||||
endforeach()
|
||||
|
||||
#Build debug
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
#Configure release
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store release makefile path
|
||||
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
|
||||
|
||||
#Build release
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
#Fix the cmake files if they exist
|
||||
if(EXISTS ${RELEASE_DIR}/lib/cmake)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
endif()
|
||||
|
||||
#Set the correct install directory to packages
|
||||
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
|
||||
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
|
||||
#Install the module files
|
||||
vcpkg_build_qmake_debug(TARGETS install)
|
||||
vcpkg_build_qmake_release(TARGETS install)
|
||||
|
||||
#Reset the path to the baseline
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
#Remove extra cmake files
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT RELEASE_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT DEBUG_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
#Move release and debug dlls to the correct directory
|
||||
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
|
||||
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll)
|
||||
if (RELEASE_DLLS)
|
||||
file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE ${RELEASE_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*)
|
||||
if(NOT RELEASE_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
endif()
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${DEBUG_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
|
||||
if(NOT DEBUG_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/lib/cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share)
|
||||
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
|
||||
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "")
|
||||
endif()
|
||||
|
||||
#Create an empty include file so that vcpkg doesn't complain
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_qt5imageformats "")
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5imageformats RENAME copyright)
|
||||
#Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
endif()
|
||||
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
|
@ -31,51 +31,127 @@ endif()
|
||||
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
||||
set(ENV{_CL_} "/utf-8")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
#Store build paths
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
#Find Python and add it to the path
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
#Configure debug
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store debug makefiles path
|
||||
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
|
||||
|
||||
#Fix path to Qt5QmlDevTools
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
|
||||
endforeach()
|
||||
|
||||
#Build debug
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
#Configure release
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store release makefile path
|
||||
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
|
||||
|
||||
#Build release
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
#Fix the cmake files if they exist
|
||||
if(EXISTS ${RELEASE_DIR}/lib/cmake)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
endif()
|
||||
|
||||
#Set the correct install directory to packages
|
||||
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
|
||||
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
|
||||
#Install the module files
|
||||
vcpkg_build_qmake_debug(TARGETS install)
|
||||
vcpkg_build_qmake_release(TARGETS install)
|
||||
|
||||
#Reset the path to the baseline
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
#Remove extra cmake files
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT RELEASE_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT DEBUG_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
#Move release and debug dlls to the correct directory
|
||||
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
|
||||
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll)
|
||||
if (RELEASE_DLLS)
|
||||
file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE ${RELEASE_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*)
|
||||
if(NOT RELEASE_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
endif()
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${DEBUG_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
|
||||
if(NOT DEBUG_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
|
||||
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "")
|
||||
endif()
|
||||
|
||||
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5multimedia RENAME copyright)
|
||||
#Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
endif()
|
||||
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
|
@ -31,56 +31,127 @@ endif()
|
||||
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
||||
set(ENV{_CL_} "/utf-8")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
#Store build paths
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
#Find Python and add it to the path
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
#Configure debug
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store debug makefiles path
|
||||
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
|
||||
|
||||
#Fix path to Qt5QmlDevTools
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
|
||||
endforeach()
|
||||
|
||||
#Build debug
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
#Configure release
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store release makefile path
|
||||
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
|
||||
|
||||
#Build release
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
#Fix the cmake files if they exist
|
||||
if(EXISTS ${RELEASE_DIR}/lib/cmake)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
endif()
|
||||
|
||||
#Set the correct install directory to packages
|
||||
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
|
||||
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
|
||||
#Install the module files
|
||||
vcpkg_build_qmake_debug(TARGETS install)
|
||||
vcpkg_build_qmake_release(TARGETS install)
|
||||
|
||||
#Reset the path to the baseline
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/*.exe")
|
||||
file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5)
|
||||
file(REMOVE ${BINARY_TOOLS})
|
||||
file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/*.exe")
|
||||
file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5)
|
||||
file(REMOVE ${BINARY_TOOLS})
|
||||
#Remove extra cmake files
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT RELEASE_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT DEBUG_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
#Move release and debug dlls to the correct directory
|
||||
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
|
||||
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll)
|
||||
if (RELEASE_DLLS)
|
||||
file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE ${RELEASE_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*)
|
||||
if(NOT RELEASE_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
endif()
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${DEBUG_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
|
||||
if(NOT DEBUG_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
|
||||
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "")
|
||||
endif()
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
|
||||
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5scxml RENAME copyright)
|
||||
#Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
endif()
|
||||
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
|
@ -31,49 +31,127 @@ endif()
|
||||
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
||||
set(ENV{_CL_} "/utf-8")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
#Store build paths
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
#Find Python and add it to the path
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
#Configure debug
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store debug makefiles path
|
||||
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
|
||||
|
||||
#Fix path to Qt5QmlDevTools
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
|
||||
endforeach()
|
||||
|
||||
#Build debug
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
#Configure release
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store release makefile path
|
||||
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
|
||||
|
||||
#Build release
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
#Fix the cmake files if they exist
|
||||
if(EXISTS ${RELEASE_DIR}/lib/cmake)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
endif()
|
||||
|
||||
#Set the correct install directory to packages
|
||||
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
|
||||
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
|
||||
#Install the module files
|
||||
vcpkg_build_qmake_debug(TARGETS install)
|
||||
vcpkg_build_qmake_release(TARGETS install)
|
||||
|
||||
#Reset the path to the baseline
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
#Remove extra cmake files
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT RELEASE_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT DEBUG_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
#Move release and debug dlls to the correct directory
|
||||
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
|
||||
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll)
|
||||
if (RELEASE_DLLS)
|
||||
file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE ${RELEASE_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*)
|
||||
if(NOT RELEASE_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
endif()
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${DEBUG_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
|
||||
if(NOT DEBUG_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
|
||||
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "")
|
||||
endif()
|
||||
|
||||
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5serial RENAME copyright)
|
||||
#Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
endif()
|
||||
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
|
@ -31,51 +31,127 @@ endif()
|
||||
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
||||
set(ENV{_CL_} "/utf-8")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
#Store build paths
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
#Find Python and add it to the path
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
#Configure debug
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store debug makefiles path
|
||||
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
|
||||
|
||||
#Fix path to Qt5QmlDevTools
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
|
||||
endforeach()
|
||||
|
||||
#Build debug
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
#Configure release
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store release makefile path
|
||||
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
|
||||
|
||||
#Build release
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
#Fix the cmake files if they exist
|
||||
if(EXISTS ${RELEASE_DIR}/lib/cmake)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
endif()
|
||||
|
||||
#Set the correct install directory to packages
|
||||
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
|
||||
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
|
||||
#Install the module files
|
||||
vcpkg_build_qmake_debug(TARGETS install)
|
||||
vcpkg_build_qmake_release(TARGETS install)
|
||||
|
||||
#Reset the path to the baseline
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
#Remove extra cmake files
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT RELEASE_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT DEBUG_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
#Move release and debug dlls to the correct directory
|
||||
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
|
||||
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll)
|
||||
if (RELEASE_DLLS)
|
||||
file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE ${RELEASE_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*)
|
||||
if(NOT RELEASE_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
endif()
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${DEBUG_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
|
||||
if(NOT DEBUG_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
|
||||
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "")
|
||||
endif()
|
||||
|
||||
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5speech RENAME copyright)
|
||||
#Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
endif()
|
||||
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
|
@ -31,51 +31,127 @@ endif()
|
||||
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
||||
set(ENV{_CL_} "/utf-8")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
#Store build paths
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
#Find Python and add it to the path
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
#Configure debug
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store debug makefiles path
|
||||
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
|
||||
|
||||
#Fix path to Qt5QmlDevTools
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
|
||||
endforeach()
|
||||
|
||||
#Build debug
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
#Configure release
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store release makefile path
|
||||
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
|
||||
|
||||
#Build release
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
#Fix the cmake files if they exist
|
||||
if(EXISTS ${RELEASE_DIR}/lib/cmake)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
endif()
|
||||
|
||||
#Set the correct install directory to packages
|
||||
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
|
||||
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
|
||||
#Install the module files
|
||||
vcpkg_build_qmake_debug(TARGETS install)
|
||||
vcpkg_build_qmake_release(TARGETS install)
|
||||
|
||||
#Reset the path to the baseline
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
#Remove extra cmake files
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT RELEASE_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT DEBUG_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
#Move release and debug dlls to the correct directory
|
||||
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
|
||||
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll)
|
||||
if (RELEASE_DLLS)
|
||||
file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE ${RELEASE_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*)
|
||||
if(NOT RELEASE_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
endif()
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${DEBUG_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
|
||||
if(NOT DEBUG_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
|
||||
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "")
|
||||
endif()
|
||||
|
||||
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5svg RENAME copyright)
|
||||
#Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
endif()
|
||||
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
|
@ -1,4 +1,4 @@
|
||||
Source: qt5tools
|
||||
Version: 5.9.2-0
|
||||
Description: Qt5 Tools Module. Includes deployment tools and helpers, Qt Designer, Assistant, and other applications
|
||||
Build-Depends: qt5base
|
||||
Description: Qt5 Tools Module; Includes deployment tools and helpers, Qt Designer, Assistant, and other applications
|
||||
Build-Depends: qt5base, qt5declarative
|
@ -31,55 +31,127 @@ endif()
|
||||
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
||||
set(ENV{_CL_} "/utf-8")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
|
||||
#Store build paths
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
#Find Python and add it to the path
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
#Configure debug
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store debug makefiles path
|
||||
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
|
||||
|
||||
#Fix path to Qt5QmlDevTools
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
|
||||
endforeach()
|
||||
|
||||
#Build debug
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
#Configure release
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store release makefile path
|
||||
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
|
||||
|
||||
#Build release
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
#Fix the cmake files if they exist
|
||||
if(EXISTS ${RELEASE_DIR}/lib/cmake)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
endif()
|
||||
|
||||
#Set the correct install directory to packages
|
||||
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
|
||||
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
|
||||
#Install the module files
|
||||
vcpkg_build_qmake_debug(TARGETS install)
|
||||
vcpkg_build_qmake_release(TARGETS install)
|
||||
|
||||
#Reset the path to the baseline
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/*.exe")
|
||||
file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5)
|
||||
file(REMOVE ${BINARY_TOOLS})
|
||||
file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/*.exe")
|
||||
file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5)
|
||||
file(REMOVE ${BINARY_TOOLS})
|
||||
#Remove extra cmake files
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT RELEASE_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT DEBUG_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
#Move release and debug dlls to the correct directory
|
||||
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
|
||||
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll)
|
||||
if (RELEASE_DLLS)
|
||||
file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE ${RELEASE_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*)
|
||||
if(NOT RELEASE_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
endif()
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${DEBUG_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
|
||||
if(NOT DEBUG_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
|
||||
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "")
|
||||
endif()
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
|
||||
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5tools RENAME copyright)
|
||||
#Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
endif()
|
||||
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
|
@ -31,43 +31,127 @@ endif()
|
||||
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
||||
set(ENV{_CL_} "/utf-8")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
#Store build paths
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
#Find Python and add it to the path
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
#Configure debug
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store debug makefiles path
|
||||
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
|
||||
|
||||
#Fix path to Qt5QmlDevTools
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
|
||||
endforeach()
|
||||
|
||||
#Build debug
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
#Configure release
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store release makefile path
|
||||
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
|
||||
|
||||
#Build release
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
#Fix the cmake files if they exist
|
||||
if(EXISTS ${RELEASE_DIR}/lib/cmake)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
endif()
|
||||
|
||||
#Set the correct install directory to packages
|
||||
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
|
||||
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
|
||||
#Install the module files
|
||||
vcpkg_build_qmake_debug(TARGETS install)
|
||||
vcpkg_build_qmake_release(TARGETS install)
|
||||
|
||||
#Reset the path to the baseline
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
#Remove extra cmake files
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT RELEASE_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT DEBUG_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
#Move release and debug dlls to the correct directory
|
||||
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
|
||||
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll)
|
||||
if (RELEASE_DLLS)
|
||||
file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE ${RELEASE_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*)
|
||||
if(NOT RELEASE_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
endif()
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${DEBUG_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
|
||||
if(NOT DEBUG_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/lib/cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share)
|
||||
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
|
||||
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "")
|
||||
endif()
|
||||
|
||||
#Create an empty include file so that vcpkg doesn't complain
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_qt5virtualkeyboard "")
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.GPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5virtualkeyboard RENAME copyright)
|
||||
#Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
endif()
|
||||
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
|
@ -31,49 +31,127 @@ endif()
|
||||
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
||||
set(ENV{_CL_} "/utf-8")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
#Store build paths
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
#Find Python and add it to the path
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
#Configure debug
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store debug makefiles path
|
||||
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
|
||||
|
||||
#Fix path to Qt5QmlDevTools
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
|
||||
endforeach()
|
||||
|
||||
#Build debug
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
#Configure release
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store release makefile path
|
||||
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
|
||||
|
||||
#Build release
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
#Fix the cmake files if they exist
|
||||
if(EXISTS ${RELEASE_DIR}/lib/cmake)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
endif()
|
||||
|
||||
#Set the correct install directory to packages
|
||||
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
|
||||
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
|
||||
#Install the module files
|
||||
vcpkg_build_qmake_debug(TARGETS install)
|
||||
vcpkg_build_qmake_release(TARGETS install)
|
||||
|
||||
#Reset the path to the baseline
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
#Remove extra cmake files
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT RELEASE_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT DEBUG_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
#Move release and debug dlls to the correct directory
|
||||
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
|
||||
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll)
|
||||
if (RELEASE_DLLS)
|
||||
file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE ${RELEASE_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*)
|
||||
if(NOT RELEASE_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
endif()
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${DEBUG_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
|
||||
if(NOT DEBUG_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
|
||||
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "")
|
||||
endif()
|
||||
|
||||
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5websockets RENAME copyright)
|
||||
#Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
endif()
|
||||
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
|
@ -31,49 +31,127 @@ endif()
|
||||
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
||||
set(ENV{_CL_} "/utf-8")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
#Store build paths
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
#Find Python and add it to the path
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
#Configure debug
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store debug makefiles path
|
||||
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
|
||||
|
||||
#Fix path to Qt5QmlDevTools
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
|
||||
endforeach()
|
||||
|
||||
#Build debug
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
#Configure release
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store release makefile path
|
||||
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
|
||||
|
||||
#Build release
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
#Fix the cmake files if they exist
|
||||
if(EXISTS ${RELEASE_DIR}/lib/cmake)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
endif()
|
||||
|
||||
#Set the correct install directory to packages
|
||||
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
|
||||
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
|
||||
#Install the module files
|
||||
vcpkg_build_qmake_debug(TARGETS install)
|
||||
vcpkg_build_qmake_release(TARGETS install)
|
||||
|
||||
#Reset the path to the baseline
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
#Remove extra cmake files
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT RELEASE_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT DEBUG_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
#Move release and debug dlls to the correct directory
|
||||
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
|
||||
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll)
|
||||
if (RELEASE_DLLS)
|
||||
file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE ${RELEASE_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*)
|
||||
if(NOT RELEASE_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
endif()
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${DEBUG_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
|
||||
if(NOT DEBUG_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
|
||||
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "")
|
||||
endif()
|
||||
|
||||
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5winextras RENAME copyright)
|
||||
#Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
endif()
|
||||
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
|
@ -31,56 +31,127 @@ endif()
|
||||
# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings
|
||||
set(ENV{_CL_} "/utf-8")
|
||||
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
vcpkg_build_qmake_release()
|
||||
#Store build paths
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
#Find Python and add it to the path
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
||||
set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}")
|
||||
set(_path "$ENV{PATH}")
|
||||
|
||||
set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
#Configure debug
|
||||
vcpkg_configure_qmake_debug(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store debug makefiles path
|
||||
file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)
|
||||
|
||||
#Fix path to Qt5QmlDevTools
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib")
|
||||
endforeach()
|
||||
|
||||
#Build debug
|
||||
vcpkg_build_qmake_debug()
|
||||
|
||||
#Configure release
|
||||
vcpkg_configure_qmake_release(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}
|
||||
)
|
||||
|
||||
#First generate the makefiles so we can modify them
|
||||
vcpkg_build_qmake_release(TARGETS sub-src-qmake_all)
|
||||
|
||||
#Store release makefile path
|
||||
file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*)
|
||||
|
||||
#Build release
|
||||
vcpkg_build_qmake_release()
|
||||
|
||||
#Fix the cmake files if they exist
|
||||
if(EXISTS ${RELEASE_DIR}/lib/cmake)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake
|
||||
LOGNAME fix-cmake
|
||||
)
|
||||
endif()
|
||||
|
||||
#Set the correct install directory to packages
|
||||
foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES})
|
||||
vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
|
||||
vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}")
|
||||
endforeach()
|
||||
|
||||
#Install the module files
|
||||
vcpkg_build_qmake_debug(TARGETS install)
|
||||
vcpkg_build_qmake_release(TARGETS install)
|
||||
|
||||
#Reset the path to the baseline
|
||||
set(ENV{PATH} "${_path}")
|
||||
|
||||
file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug)
|
||||
#Remove extra cmake files
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT RELEASE_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
#Check if there are any libs left over; if not - delete the directory
|
||||
file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*)
|
||||
if(NOT DEBUG_LIBS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5)
|
||||
#Move release and debug dlls to the correct directory
|
||||
file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll)
|
||||
file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll)
|
||||
if (RELEASE_DLLS)
|
||||
file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE ${RELEASE_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*)
|
||||
if(NOT RELEASE_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
|
||||
endif()
|
||||
endif()
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${DEBUG_DLLS})
|
||||
#Check if there are any binaries left over; if not - delete the directory
|
||||
file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*)
|
||||
if(NOT DEBUG_BINS)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe")
|
||||
file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5)
|
||||
file(REMOVE ${BINARY_TOOLS})
|
||||
file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe")
|
||||
file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5)
|
||||
file(REMOVE ${BINARY_TOOLS})
|
||||
#If there are no include files in the module - create an empty one to stop vcpkg from complaining
|
||||
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "")
|
||||
endif()
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
|
||||
file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll")
|
||||
file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
|
||||
file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS})
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5xmlpatterns RENAME copyright)
|
||||
#Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
endif()
|
||||
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright)
|
@ -26,3 +26,4 @@ include(vcpkg_get_program_files_32_bit)
|
||||
include(vcpkg_get_program_files_platform_bitness)
|
||||
include(vcpkg_get_windows_sdk)
|
||||
include(vcpkg_acquire_depot_tools)
|
||||
include(vcpkg_replace_string)
|
||||
|
14
scripts/cmake/vcpkg_replace_string.cmake
Normal file
14
scripts/cmake/vcpkg_replace_string.cmake
Normal file
@ -0,0 +1,14 @@
|
||||
#.rst:
|
||||
# .. command:: vcpkg_replace_string
|
||||
#
|
||||
# Replace a string in a file.
|
||||
#
|
||||
# ::
|
||||
# vcpkg_replace_string(filename match_string replace_string)
|
||||
#
|
||||
#
|
||||
function(vcpkg_replace_string filename match_string replace_string)
|
||||
file(READ ${filename} _contents)
|
||||
string(REPLACE "${match_string}" "${replace_string}" _contents "${_contents}")
|
||||
file(WRITE ${filename} "${_contents}")
|
||||
endfunction()
|
Loading…
Reference in New Issue
Block a user