removed windeployqt call from cmake

This commit is contained in:
alemuntoni 2020-10-14 17:24:48 +02:00
parent 8e5a0964b0
commit e66f61d8d2
2 changed files with 36 additions and 14 deletions

View File

@ -0,0 +1,34 @@
# This is a powershell script compiling meshlab in a Windows environment.
# Requires:
# - MSVC installed;
# - Qt installed, and qmake and jom binaries directly accessible
#
# # Without given arguments, MeshLab will be built in the meshlab/src
# directory, and binaries will be placed in meshlab/distrib.
#
# You can give as argument the BUILD_PATH, and meshlab binaries will be
# then placed inside BUILD_PATH/distrib.
#saving location where script has been run
write-host "N of arguments: $($args.count)"
$DIR = Get-Location
$SOURCE_PATH = Join-Path $PSScriptRoot ..\..\..\src
if ($args.Count -gt 0){
$BUILD_PATH = Resolve-Path -Path $args[0]
} else {
$BUILD_PATH = $SOURCE_PATH #default build
}
New-Item -ItemType Directory -Force -Path $BUILD_PATH
cd $BUILD_PATH
write-host "Build path is: $($BUILD_PATH)"
qmake $SOURCE_PATH\meshlab.pro
jom -j4 #Qt nmake for parallel build
#going back to original location
cd $DIR

View File

@ -67,15 +67,7 @@ if(WIN32)
OFF)
get_target_property(Qt5_qmake_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
get_filename_component(Qt5_BIN_DIR "${Qt5_qmake_EXECUTABLE}" DIRECTORY)
find_program(
Qt5_windeployqt_EXECUTABLE
NAMES windeployqt
HINTS ${Qt5_BIN_DIR})
if(Qt5_windeployqt_EXECUTABLE)
option(BUILD_WITH_WINDEPLOYQT_POST_BUILD
"Should we run windeployqt after the build to copy the qt parts to the build tree?" ON)
endif()
get_filename_component(Qt5_BIN_DIR "${Qt5_qmake_EXECUTABLE}" DIRECTORY)
else()
set(INSTALL_TO_UNIX_LAYOUT ON)
endif()
@ -136,7 +128,7 @@ endif()
if(WIN32)
add_definitions(-DNOMINMAX)
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
endif()
endif()
@ -309,7 +301,3 @@ if(NOT WIN32 AND NOT APPLE)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../install/linux/resources/meshlab.desktop" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../install/meshlab.png" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps)
endif()
if(Qt5_windeployqt_EXECUTABLE AND BUILD_WITH_WINDEPLOYQT_POST_BUILD)
install(CODE "execute_process(COMMAND \"${Qt5_windeployqt_EXECUTABLE}\" --no-translations meshlab.exe WORKING_DIRECTORY \${CMAKE_INSTALL_PREFIX})")
endif()