Permalink
Browse files

CMake: Fix RPM/DEB generation rules

  • Loading branch information...
1 parent c3cd248 commit 3767d339d4b1495b269711a7123383d977147984 @rhtyd committed Sep 13, 2011
Showing with 26 additions and 15 deletions.
  1. +25 −14 CMakeLists.txt
  2. +1 −1 src/CMakeLists.txt
View
@@ -104,28 +104,27 @@ IF(WIN32)
ADD_DEFINITIONS( -I${CONTRIBS_PATH}/include/qt4/QtXml)
ADD_DEFINITIONS( -I${CONTRIBS_PATH}/include/qt4/QtNetwork)
ADD_DEFINITIONS( -I${CONTRIBS_PATH}/include/qt4/)
- ADD_DEFINITIONS( -DQT_NO_OPENSSL)
- FIND_PACKAGE(Qt4 4.6.0 COMPONENTS QtCore QtGui QtXml QtSvg REQUIRED )
+ FIND_PACKAGE(Qt4 4.6.0 COMPONENTS QtCore QtGui QtXml QtSvg QtNetwork REQUIRED )
ELSE(WIN32)
- FIND_PACKAGE(Qt4 4.6.0 COMPONENTS QtCore QtGui QtXml QtSvg REQUIRED )
+ FIND_PACKAGE(Qt4 4.6.0 COMPONENTS QtCore QtGui QtXml QtSvg QtNetwork REQUIRED )
ENDIF(WIN32)
IF (NOT WIN32)
#FindQt4.cmake is so brain-dead when Xcompiling
SET(CMAKEQT_LIBS ${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTSVG_LIBRARY}
+ ${QT_QTNETWORK_LIBRARY}
${QT_QTXML_LIBRARY}) # Add here any other QT module or other library
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
ELSE (NOT WIN32)
- SET (CMAKEQT_LIBS # Manually specify paths
- ${CONTRIBS_PATH}/lib/libQtNetwork.a ${CONTRIBS_PATH}/lib/libQtXml.a
- ${CONTRIBS_PATH}/lib/libqtaccessiblewidgets.a
+ SET (CMAKEQT_LIBS -L${CONTRIBS_PATH}/lib # Manually specify paths
+ ${CONTRIBS_PATH}/lib/libQtNetwork.a
+ ${CONTRIBS_PATH}/lib/libQtXml.a
${CONTRIBS_PATH}/lib/libQtGui.a
- ${CONTRIBS_PATH}/lib/libqtaccessiblewidgets.a
${CONTRIBS_PATH}/lib/libQtCore.a
- ws2_32 winmm imm32)
+ ws2_32 winmm imm32 libeay32 ssleay32 crypt32 gdi32)
ENDIF(NOT WIN32)
# Copy the sh launcher
@@ -198,7 +197,7 @@ INCLUDE(InstallRequiredSystemLibraries)
SET(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
SET(CPACK_PACKAGE_NAME ${PROJECT_NAME_SHORT})
-SET(CPACK_PACKAGE_DESCRIPTION "${PROJECT_NAME_SHORT} \n ${PROJECT_DESCRIPTION}")
+SET(CPACK_PACKAGE_DESCRIPTION "${PROJECT_NAME_LONG}")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME_SHORT} \n ${PROJECT_DESCRIPTION}")
SET(CPACK_PACKAGE_VENDOR ${PROJECT_VENDOR})
SET(CPACK_PACKAGE_CONTACT ${PROJECT_CONTACT})
@@ -227,18 +226,30 @@ ENDIF(WIN32 AND NOT UNIX)
INCLUDE(${CMAKE_MODULE_PATH}/RpmBuild.cmake)
IF(RPMBUILD_FOUND AND NOT WIN32)
SET(CPACK_GENERATOR "RPM")
+ SET(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
+ SET(CPACK_RPM_PACKAGE_NAME ${CPACK_PACKAGE_NAME})
+ SET(CPACK_RPM_PACKAGE_VERSION ${PROJECT_VERSION})
+ SET(CPACK_RPM_PACKAGE_LICENSE "GPLv2+ License")
+ SET(CPACK_RPM_PACKAGE_GROUP ${PROJECT_VENDOR})
+ SET(CPACK_RPM_PACKAGE_VENDOR ${PROJECT_VENDOR})
+ SET(CPACK_RPM_PACKAGE_DESCRIPTION ${PROJECT_DESCRIPTION})
+ SET(CPACK_RPM_PACKAGE_DEPENDS "qt ( >= 4.6 ), qt-x11 ( >= 4.6 )") # Specify dependencies here
SET(CPACK_SET_DESTDIR TRUE)
ENDIF(RPMBUILD_FOUND AND NOT WIN32)
# Debian packages
INCLUDE (${CMAKE_MODULE_PATH}/DpkgBuild.cmake)
IF(DPKG_FOUND AND NOT WIN32)
SET(CPACK_GENERATOR "DEB")
- SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
- SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
+ SET(CPACK_DEBIAN_PACKAGE_NAME ${CPACK_PACKAGE_NAME})
+ SET(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
+ SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
+ SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_VENDOR} <${CPACK_PACKAGE_CONTACT}>")
+ SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
+ SET(CPACK_DEBIAN_PACKAGE_DEBUG ON)
+ SET(CPACK_DEBIAN_PACKAGE_DEPENDS ${PACKAGE_REQUIRES})
+ SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-gui ( >= 4.6 ), libqt4-xml ( >= 4.6 )") # Specify dependencies here
SET(CPACK_SET_DESTDIR TRUE)
- SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386) # Change to your architecture here
- SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-gui ( >= 4.6 ), libqt4-xml ( >= 4.6 ), libqt4-svg ( >= 4.6 )") # Specify dependencies here
ENDIF(DPKG_FOUND AND NOT WIN32)
# Mac App Bundle
@@ -247,7 +258,7 @@ IF(APPLE)
# Libraries are bundled directly
SET(CPACK_COMPONENT_LIBRARIES_HIDDEN TRUE)
# Bundle Properties
- SET(MACOSX_BUNDLE_BUNDLE_NAME cmakeqt)
+ SET(MACOSX_BUNDLE_BUNDLE_NAME CMakeQt)
SET(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION})
SET(MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION})
SET(MACOSX_BUNDLE_LONG_VERSION_STRING "Version ${PROJECT_VERSION}")
View
@@ -59,7 +59,7 @@ IF(APPLE)
SET(CMAKEQT_SRCS ${CMAKEQT_SRCS} ../share/cmakeqt.icns)
SET_SOURCE_FILES_PROPERTIES(../share/cmakeqt.icns PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
- SET(MACOSX_BUNDLE_ICON_FILE VLMC.icns)
+ SET(MACOSX_BUNDLE_ICON_FILE cmakeqt.icns)
ENDIF(APPLE)
ADD_EXECUTABLE(cmakeqt ${CMAKEQT_SRCS} ${CMAKEQT_MOC_SRCS} ${CMAKEQT_UIS_H} ${CMAKEQT_RCC_SRCS} )

0 comments on commit 3767d33

Please sign in to comment.