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.
This commit is contained in:
Kornel Benko 2017-05-02 08:16:00 +02:00
parent 08a840b139
commit 0935f94f0d

View File

@ -455,14 +455,22 @@ else()
set(SYSTEM_DATADIR "${CMAKE_INSTALL_PREFIX}") set(SYSTEM_DATADIR "${CMAKE_INSTALL_PREFIX}")
endif() 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 # see routines
# Package::messages_file() # Package::messages_file()
# get_default_user_support_dir() # get_default_user_support_dir()
# relative_system_support_dir() # relative_system_support_dir()
# in src/support/Package.cpp # in src/support/Package.cpp
# #
if(LYX_PROGRAM_SUFFIX) if(suffixing)
set(PACKAGE ${PACKAGE_BASE}${LYX_INSTALL_SUFFIX}) set(PACKAGE ${PACKAGE_BASE}${LYX_INSTALL_SUFFIX})
else() else()
set(PACKAGE ${PACKAGE_BASE}) set(PACKAGE ${PACKAGE_BASE})