Updates the Qt4 and Qt5 library names and related stuff
authorLuís Pereira <luis.artur.pereira@gmail.com>
Fri, 30 May 2014 22:58:55 +0000 (15:58 -0700)
committerLuís Pereira <luis.artur.pereira@gmail.com>
Fri, 30 May 2014 22:58:55 +0000 (15:58 -0700)
Qt4 library name is liblxqt. The prefix for install path is lxqt. It
remains untouched.
The Qt5 library name is liblxqt-qt5. The prefix for install path is also
lxqt-qt5.

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
CMakeLists.txt

index 909ca74..fb1ddac 100644 (file)
@@ -157,6 +157,7 @@ if(USE_QT5)
     )
 
     set(LXQT_QT_VERSION "5")
+    set(LXQT_QT_VERSION_SUFFIX "-qt5")
     set(LXQT_PKG_CONFIG_REQUIRES "Qt5Widgets Qt5Xml Qt5DBus Qt5X11Extras")
 else()
     find_package(Qt4 REQUIRED QtCore QtGui QUIET)
@@ -174,6 +175,7 @@ else()
     )
 
     set(LXQT_QT_VERSION "4")
+    set(LXQT_QT_VERSION_SUFFIX "")
     set(LXQT_PKG_CONFIG_REQUIRES "QtCore, QtXml")
 endif()
 
@@ -197,14 +199,14 @@ endif()
 include(GNUInstallDirs)
 
 set(LXQT_VERSION ${LXQT_MAJOR_VERSION}.${LXQT_MINOR_VERSION}.${LXQT_PATCH_VERSION})
-set(LXQT_LIBRARY_NAME "lxqt${LXQT_QT_VERSION}")
-set(LXQT_SHARE_DIR ${CMAKE_INSTALL_PREFIX}/share/lxqt${LXQT_QT_VERSION})
+set(LXQT_LIBRARY_NAME "lxqt${LXQT_QT_VERSION_SUFFIX}")
+set(LXQT_SHARE_DIR ${CMAKE_INSTALL_PREFIX}/share/${LXQT_LIBRARY_NAME})
 set(LXQT_TRANSLATIONS_DIR ${LXQT_SHARE_DIR}/translations)
 
 set(LXQT_INTREE_INCLUDE_DIR     ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/include)
 set(LXQT_INTREE_TARGETS_FILE    ${CMAKE_BINARY_DIR}/${LXQT_LIBRARY_NAME}-targets.cmake)
 
-set(LXQT_INSTALL_INCLUDE_DIR   ${CMAKE_INSTALL_FULL_INCLUDEDIR}/lxqt${LXQT_QT_VERSION})
+set(LXQT_INSTALL_INCLUDE_DIR   ${CMAKE_INSTALL_FULL_INCLUDEDIR}/${LXQT_LIBRARY_NAME})
 set(LXQT_INSTALL_CMAKE_DIR     ${CMAKE_INSTALL_PREFIX}/share/cmake)
 
 include(cmake/FindInstallConfigPath.cmake)