Cmake build: Correct suffixing on non-gcc-compilers

If the value LYX_PROGRAM_SUFFIX is not handled, we have to use
LYX_PACKAGE_SUFFIX.
The naming 'PACKAGE' in our sources is misleading, as it is used
for the name of the debian/rpm packages as well.

(cherry picked from commit 0935f94f0d)
This commit is contained in:
Kornel Benko 2017-05-02 08:16:00 +02:00 committed by Scott Kostyshak
parent 3af3e7e626
commit 5c7df3cc3b

View File

@ -463,14 +463,22 @@ else()
set(SYSTEM_DATADIR "${CMAKE_INSTALL_PREFIX}")
endif()
# The define below allows lyx-executable to find its default configuration files
if(CMAKE_COMPILER_IS_GNUCXX)
message(STATUS "CMAKE_COMPILER_IS_GNUCXX = ${CMAKE_COMPILER_IS_GNUCXX}")
set(suffixing ${LYX_PROGRAM_SUFFIX})
else()
# Not a GCC compiler, programs do not have a suffix
set(suffixing ${LYX_PACKAGE_SUFFIX})
endif()
# The define PACKAGE below allows lyx-executable to find its default configuration files
# see routines
# Package::messages_file()
# get_default_user_support_dir()
# relative_system_support_dir()
# in src/support/Package.cpp
#
if(LYX_PROGRAM_SUFFIX)
if(suffixing)
set(PACKAGE ${PACKAGE_BASE}${LYX_INSTALL_SUFFIX})
else()
set(PACKAGE ${PACKAGE_BASE})