commit 5c7df3cc3b286e3737630f361babdb0f74dd7ee6
Author: Kornel Benko <[email protected]>
Date: Tue May 2 08:16:00 2017 +0200
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 0935f94f0d448c1a9b521e4825b30b94fe0521ff)
---
CMakeLists.txt | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f9fe759..250e26b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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})