more correct stripping of symbols APPLE and UNIX

This commit is contained in:
Andrew Meadows 2019-05-15 15:54:58 -07:00
parent abc5a0e7e8
commit a4d43bbff9

View file

@ -42,9 +42,6 @@ project(hifi)
include("cmake/init.cmake")
include("cmake/compiler.cmake")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
add_paths_to_fixup_libs(${VCPKG_INSTALL_ROOT}/bin)
add_paths_to_fixup_libs(${VCPKG_INSTALL_ROOT}/debug/bin)
@ -199,6 +196,15 @@ unset(JS_SRC)
set_packaging_parameters()
if (PRODUCTION_BUILD)
if (APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-s")
elseif(UNIX)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
endif()
endif()
# Locate the required Qt build on the filesystem
setup_qt()
list(APPEND CMAKE_PREFIX_PATH "${QT_CMAKE_PREFIX_PATH}")