mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:37:51 +02:00
Bundling and consolidating deployment package
This commit is contained in:
parent
6105191a3f
commit
e17d0b2af3
6 changed files with 21 additions and 14 deletions
|
@ -10,5 +10,4 @@ link_hifi_libraries(
|
||||||
)
|
)
|
||||||
|
|
||||||
include_application_version()
|
include_application_version()
|
||||||
|
package_libraries_for_deployment()
|
||||||
copy_dlls_beside_windows_executable()
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
# 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
|
||||||
#
|
#
|
||||||
|
|
||||||
macro(COPY_DLLS_BESIDE_WINDOWS_EXECUTABLE)
|
macro(PACKAGE_LIBRARIES_FOR_DEPLOYMENT)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
configure_file(
|
configure_file(
|
||||||
|
@ -18,11 +18,7 @@ macro(COPY_DLLS_BESIDE_WINDOWS_EXECUTABLE)
|
||||||
@ONLY
|
@ONLY
|
||||||
)
|
)
|
||||||
|
|
||||||
if (APPLE)
|
|
||||||
set(PLUGIN_PATH "interface.app/Contents/MacOS/plugins")
|
|
||||||
else()
|
|
||||||
set(PLUGIN_PATH "plugins")
|
set(PLUGIN_PATH "plugins")
|
||||||
endif()
|
|
||||||
|
|
||||||
# add a post-build command to copy DLLs beside the executable
|
# add a post-build command to copy DLLs beside the executable
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
|
@ -46,5 +42,18 @@ macro(COPY_DLLS_BESIDE_WINDOWS_EXECUTABLE)
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND CMD /C "SET PATH=%PATH%;${QT_DIR}/bin && ${WINDEPLOYQT_COMMAND} $<$<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>,$<CONFIG:RelWithDebInfo>>:--release> $<TARGET_FILE:${TARGET_NAME}>"
|
COMMAND CMD /C "SET PATH=%PATH%;${QT_DIR}/bin && ${WINDEPLOYQT_COMMAND} $<$<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>,$<CONFIG:RelWithDebInfo>>:--release> $<TARGET_FILE:${TARGET_NAME}>"
|
||||||
)
|
)
|
||||||
|
elseif (DEFINED BUILD_BUNDLE AND BUILD_BUNDLE AND APPLE)
|
||||||
|
find_program(MACDEPLOYQT_COMMAND macdeployqt PATHS ${QT_DIR}/bin NO_DEFAULT_PATH)
|
||||||
|
|
||||||
|
if (NOT MACDEPLOYQT_COMMAND)
|
||||||
|
message(FATAL_ERROR "Could not find macdeployqt at ${QT_DIR}/bin. macdeployqt is required.")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# add a post-build command to call macdeployqt to copy Qt plugins
|
||||||
|
add_custom_command(
|
||||||
|
TARGET ${TARGET_NAME}
|
||||||
|
POST_BUILD
|
||||||
|
COMMAND ${MACDEPLOYQT_COMMAND} ${CMAKE_CURRENT_BINARY_DIR}/\${CONFIGURATION}/${TARGET_NAME}.app -verbose 0
|
||||||
|
)
|
||||||
endif ()
|
endif ()
|
||||||
endmacro()
|
endmacro()
|
|
@ -17,13 +17,10 @@ hifi_library_search_hints("quazip")
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
find_path(QUAZIP_INCLUDE_DIRS quazip.h PATH_SUFFIXES include/quazip HINTS ${QUAZIP_SEARCH_DIRS})
|
find_path(QUAZIP_INCLUDE_DIRS quazip.h PATH_SUFFIXES include/quazip HINTS ${QUAZIP_SEARCH_DIRS})
|
||||||
# find_library(QUAZIP_LIBRARIES NAMES quazip PATH_SUFFIXES lib HINTS ${QUAZIP_SEARCH_DIRS})
|
|
||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
find_path(QUAZIP_INCLUDE_DIRS quazip.h PATH_SUFFIXES include/quazip HINTS ${QUAZIP_SEARCH_DIRS})
|
find_path(QUAZIP_INCLUDE_DIRS quazip.h PATH_SUFFIXES include/quazip HINTS ${QUAZIP_SEARCH_DIRS})
|
||||||
# find_library(QUAZIP_LIBRARIES NAMES quazip PATH_SUFFIXES lib HINTS ${QUAZIP_SEARCH_DIRS})
|
|
||||||
else ()
|
else ()
|
||||||
find_path(QUAZIP_INCLUDE_DIRS quazip.h PATH_SUFFIXES quazip HINTS ${QUAZIP_SEARCH_DIRS})
|
find_path(QUAZIP_INCLUDE_DIRS quazip.h PATH_SUFFIXES quazip HINTS ${QUAZIP_SEARCH_DIRS})
|
||||||
# find_library(QUAZIP_LIBRARIES NAMES quazip-qt5 PATH_SUFFIXES lib HINTS ${QUAZIP_SEARCH_DIRS})
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
|
@ -37,4 +37,4 @@ if (UNIX)
|
||||||
endif (UNIX)
|
endif (UNIX)
|
||||||
|
|
||||||
include_application_version()
|
include_application_version()
|
||||||
copy_dlls_beside_windows_executable()
|
package_libraries_for_deployment()
|
||||||
|
|
|
@ -201,4 +201,4 @@ else (APPLE)
|
||||||
endif()
|
endif()
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
|
|
||||||
copy_dlls_beside_windows_executable()
|
package_libraries_for_deployment()
|
||||||
|
|
|
@ -46,3 +46,5 @@ else ()
|
||||||
# add_executable(${TARGET_NAME} ${SM_SRCS})
|
# add_executable(${TARGET_NAME} ${SM_SRCS})
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
package_libraries_for_deployment()
|
Loading…
Reference in a new issue