Files
o3de/cmake/Platform/Mac/Configurations_mac.cmake
T
SJ 7eeaf7dad5 Generate install layout for Mac (#2144)
* 1. Move call to install(TARGETS...) to its own function to create a platform specific implementation for Mac.
2. Add linker-signed flag to work around cmake install issue.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Add newline

Signed-off-by: amzn-sj <srikkant@amazon.com>

* 1. Rename function to ly_install_target_override and only call it if it has been implemented.
2. Pass in runtime, archive, and library directory paths as params to clean it up a bit.

Signed-off-by: amzn-sj <srikkant@amazon.com>
2021-07-14 17:32:07 -07:00

40 lines
1.1 KiB
CMake

#
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
include(cmake/Platform/Common/Clang/Configurations_clang.cmake)
ly_append_configurations_options(
DEFINES
APPLE
MAC
__APPLE__
DARWIN
LINK_NON_STATIC
-headerpad_max_install_names
-lpthread
-lncurses
)
ly_set(CMAKE_CXX_EXTENSIONS OFF)
else()
message(FATAL_ERROR "Compiler ${CMAKE_CXX_COMPILER_ID} not supported in ${PAL_PLATFORM_NAME}")
endif()
# Signing
# The "-o linker-signed" flag is required as a work-around for the following CMake issue:
# https://gitlab.kitware.com/cmake/cmake/-/issues/21854
ly_set(CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "--deep -o linker-signed")
# Generate scheme files for Xcode
ly_set(CMAKE_XCODE_GENERATE_SCHEME TRUE)
# Make modules have the dylib extension
ly_set(CMAKE_SHARED_MODULE_SUFFIX .dylib)