mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 14:00:43 +02:00
copy dlls beside windows executable for all executables
This commit is contained in:
parent
801ab0e2b9
commit
97fa1412e2
4 changed files with 28 additions and 12 deletions
|
@ -3,7 +3,7 @@
|
||||||
# cmake/macros
|
# cmake/macros
|
||||||
#
|
#
|
||||||
# Copyright 2015 High Fidelity, Inc.
|
# Copyright 2015 High Fidelity, Inc.
|
||||||
# Created by Stephen Birarda on February 13, 2014
|
# Created by Stephen Birarda on February 17, 2014
|
||||||
#
|
#
|
||||||
# Distributed under the Apache License, Version 2.0.
|
# Distributed under the Apache License, Version 2.0.
|
||||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
|
24
cmake/macros/CopyDllsBesideWindowsExecutable.cmake
Normal file
24
cmake/macros/CopyDllsBesideWindowsExecutable.cmake
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#
|
||||||
|
# CopyDllsBesideWindowsExecutable.cmake
|
||||||
|
# cmake/macros
|
||||||
|
#
|
||||||
|
# Copyright 2015 High Fidelity, Inc.
|
||||||
|
# Created by Stephen Birarda on February 17, 2014
|
||||||
|
#
|
||||||
|
# Distributed under the Apache License, Version 2.0.
|
||||||
|
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
#
|
||||||
|
|
||||||
|
macro(COPY_DLLS_BESIDE_WINDOWS_EXECUTABLE)
|
||||||
|
if (WIN32)
|
||||||
|
# add a post-build command to copy DLLs beside the interface executable
|
||||||
|
add_custom_command(
|
||||||
|
TARGET ${TARGET_NAME}
|
||||||
|
POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND}
|
||||||
|
-DBUNDLE_EXECUTABLE=$<TARGET_FILE:${TARGET_NAME}>
|
||||||
|
-DLIB_PATHS=${LIB_PATHS}
|
||||||
|
-P ${HIFI_CMAKE_DIR}/scripts/FixupBundlePostBuild.cmake
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
endmacro()
|
|
@ -34,4 +34,6 @@ macro(SETUP_HIFI_PROJECT)
|
||||||
foreach(QT_MODULE ${${TARGET_NAME}_DEPENDENCY_QT_MODULES})
|
foreach(QT_MODULE ${${TARGET_NAME}_DEPENDENCY_QT_MODULES})
|
||||||
target_link_libraries(${TARGET_NAME} Qt5::${QT_MODULE})
|
target_link_libraries(${TARGET_NAME} Qt5::${QT_MODULE})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
copy_dlls_beside_windows_executable()
|
||||||
endmacro()
|
endmacro()
|
|
@ -239,17 +239,7 @@ else (APPLE)
|
||||||
endif()
|
endif()
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
|
|
||||||
if (WIN32)
|
copy_dlls_beside_windows_executable()
|
||||||
# add a post-build command to copy DLLs beside the interface executable
|
|
||||||
add_custom_command(
|
|
||||||
TARGET ${TARGET_NAME}
|
|
||||||
POST_BUILD
|
|
||||||
COMMAND ${CMAKE_COMMAND}
|
|
||||||
-DBUNDLE_EXECUTABLE=$<TARGET_FILE:${TARGET_NAME}>
|
|
||||||
-DLIB_PATHS=${LIB_PATHS}
|
|
||||||
-P ${HIFI_CMAKE_DIR}/scripts/FixupBundlePostBuild.cmake
|
|
||||||
)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
# link any dependencies bubbled up from our linked dependencies
|
# link any dependencies bubbled up from our linked dependencies
|
||||||
include_dependency_includes()
|
include_dependency_includes()
|
||||||
|
|
Loading…
Reference in a new issue