mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 06:37:27 +02:00
customize Interface output name for PR/dev/prod
This commit is contained in:
parent
f87d8885f4
commit
e3ef18ae6e
3 changed files with 16 additions and 35 deletions
|
@ -12,7 +12,8 @@ macro(SETUP_HIFI_PLUGIN)
|
||||||
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Plugins")
|
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Plugins")
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
set(PLUGIN_PATH "interface.app/Contents/PlugIns")
|
get_property(_INTERFACE_BUNDLE_NAME GLOBAL PROPERTY INTERFACE_BUNDLE_NAME)
|
||||||
|
set(PLUGIN_PATH "${_INTERFACE_BUNDLE_NAME}.app/Contents/PlugIns")
|
||||||
else()
|
else()
|
||||||
set(PLUGIN_PATH "plugins")
|
set(PLUGIN_PATH "plugins")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
#
|
|
||||||
# RenameInterfaceBundle.cmake.in
|
|
||||||
# cmake/templates
|
|
||||||
#
|
|
||||||
# Copyright 2016 High Fidelity, Inc.
|
|
||||||
# Created by Stephen Birarda on January 5, 2016
|
|
||||||
#
|
|
||||||
# Distributed under the Apache License, Version 2.0.
|
|
||||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
#
|
|
||||||
|
|
||||||
set(SOURCE_BUNDLE "@CMAKE_INSTALL_PREFIX@/Applications/High Fidelity/interface.app")
|
|
||||||
set(DESTINATION_BUNDLE "@CMAKE_INSTALL_PREFIX@/Applications/High Fidelity/@INTERFACE_BUNDLE_NAME@.app")
|
|
||||||
message(STATUS "Renaming ${SOURCE_BUNDLE} to ${DESTINATION_BUNDLE}")
|
|
||||||
|
|
||||||
file(RENAME ${SOURCE_BUNDLE} ${DESTINATION_BUNDLE})
|
|
|
@ -100,6 +100,20 @@ endif()
|
||||||
# create the executable, make it a bundle on OS X
|
# create the executable, make it a bundle on OS X
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
add_executable(${TARGET_NAME} MACOSX_BUNDLE ${INTERFACE_SRCS} ${QM})
|
add_executable(${TARGET_NAME} MACOSX_BUNDLE ${INTERFACE_SRCS} ${QM})
|
||||||
|
|
||||||
|
# change the target name to the right thing depending on the type of build this is
|
||||||
|
# set a global INTERFACE_BUNDLE_NAME property so that we can have plugins copied to the right place
|
||||||
|
if (PRODUCTION_BUILD)
|
||||||
|
set(_INTERFACE_BUNDLE_NAME "High Fidelity")
|
||||||
|
elseif (PR_BUILD)
|
||||||
|
set(_INTERFACE_BUNDLE_NAME "High Fidelity ${BUILD_SEQ}")
|
||||||
|
elseif (DEV_BUILD)
|
||||||
|
set(_INTERFACE_BUNDLE_NAME "Interface")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set_property(GLOBAL PROPERTY INTERFACE_BUNDLE_NAME ${_INTERFACE_BUNDLE_NAME})
|
||||||
|
|
||||||
|
set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME ${_INTERFACE_BUNDLE_NAME})
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
add_executable(${TARGET_NAME} WIN32 ${INTERFACE_SRCS} ${QM})
|
add_executable(${TARGET_NAME} WIN32 ${INTERFACE_SRCS} ${QM})
|
||||||
else()
|
else()
|
||||||
|
@ -214,24 +228,6 @@ if (APPLE)
|
||||||
BUNDLE DESTINATION "Applications/High Fidelity"
|
BUNDLE DESTINATION "Applications/High Fidelity"
|
||||||
COMPONENT ${CLIENT_COMPONENT}
|
COMPONENT ${CLIENT_COMPONENT}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (PRODUCTION_BUILD OR PR_BUILD)
|
|
||||||
# for a production or PR build, setup rename of produced bundle
|
|
||||||
# for production builds it becomes "High Fidelity" and PR builds are "High Fidelity" with the PR number
|
|
||||||
if (PRODUCTION_BUILD)
|
|
||||||
set(INTERFACE_BUNDLE_NAME "High Fidelity")
|
|
||||||
elseif (PR_BUILD)
|
|
||||||
set(INTERFACE_BUNDLE_NAME "High Fidelity ${BUILD_SEQ}")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
configure_file(
|
|
||||||
${HIFI_CMAKE_DIR}/templates/RenameInterfaceBundle.cmake.in
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/RenameInterfaceBundle.cmake
|
|
||||||
@ONLY
|
|
||||||
)
|
|
||||||
|
|
||||||
set_target_properties(${TARGET_NAME} PROPERTIES POST_INSTALL_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/RenameInterfaceBundle.cmake")
|
|
||||||
endif ()
|
|
||||||
else (APPLE)
|
else (APPLE)
|
||||||
# copy the resources files beside the executable
|
# copy the resources files beside the executable
|
||||||
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
|
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
|
||||||
|
|
Loading…
Reference in a new issue