Changeset 534


Ignore:
Timestamp:
May 12, 2015, 4:52:13 PM (7 years ago)
Author:
Joachim Langenbach
Message:

Improved building and packaging meganizer

Location:
branches/0.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/0.5/CMakeLists.txt

    r527 r534  
    179179ENDIF(WITH_ZBAR)
    180180
     181FIND_PACKAGE(Qt4 REQUIRED)
     182INCLUDE(qt4_qhcp)
     183SET(QTVERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}")
     184
     185FIND_PACKAGE(LibEngsas REQUIRED)
     186IF(NOT LIBENGSAS_TESTING_FOUND)
     187        MESSAGE("Disabled BUILD_TESTING and BUILD_DEV because of missing LIBENGSAS_TESTING.")
     188        MESSAGE("  To fix this, install LibEngsas with INSTALL_LIBENGSAS_TESTING.")
     189        SET(BUILD_TESTING OFF)
     190        SET(BUILD_DEV OFF)
     191ENDIF(NOT LIBENGSAS_TESTING_FOUND)
    181192
    182193# directory to install binaries
     
    188199ENDIF(WIN32)
    189200
     201# shared library directory ($LIB_INSTALL_DIR)
     202# and directory for plugins, translations, ... ($share_DIR)
     203IF(NOT WIN32)
     204        # SET(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib/" CACHE STRING "Where to install the library files to")
     205        SET(LIB_INSTALL_DIR "lib/" CACHE STRING "Where to install the library files to")
     206ENDIF(NOT WIN32)
    190207SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
    191208IF(UNIX)
    192209        SET(share_DIR ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME})
    193         SET(PLUGINDIR ${LIB_INSTALL_DIR}/${PROJECT_NAME})
    194         SET(man_DIR ${CMAKE_INSTALL_PREFIX}/share/man)
    195         SET(DOCDIR ${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME})
     210        SET(PLUGINDIR ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/${PROJECT_NAME})
     211        SET(man_DIR share/man)
     212        SET(DOCDIR share/doc/${PROJECT_NAME})
    196213#  SET(designer_DIR "/usr/lib/qt4/plugins/designer")
    197214        SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
    198         IF(NOT FOUND ${CMAKE_INSTALL_LIBDIR})
    199                 SET(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib)
    200                 SET(CMAKE_INSTALL_LIBDIR ${LIB_INSTALL_DIR})
    201         ELSE(NOT FOUND ${CMAKE_INSTALL_LIBDIR})
    202                 SET(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR})
    203         ENDIF(NOT FOUND ${CMAKE_INSTALL_LIBDIR})
    204         SET(include_DIR ${CMAKE_INSTALL_PREFIX}/include/meganizer)
     215        SET(include_DIR include/meganizer)
    205216        SET(find_cmake_DIR ${CMAKE_ROOT}/Modules/)
    206217        SET(pkgconfig_DIR ${LIB_INSTALL_DIR}/pkgconfig/)
     
    212223        SET(DOCDIR ${bin_DIR}/doc)
    213224        SET(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH})
    214         SET(include_DIR ${CMAKE_INSTALL_PREFIX}/include)
     225        SET(include_DIR ${bin_DIR}/include)
    215226        IF(BUILD_PACKAGE)
    216227                SET(find_cmake_DIR ${bin_DIR})
     
    238249SET(depends_DIR ${share_DIR}/depends)
    239250
    240 FIND_PACKAGE(Qt4 REQUIRED)
    241 INCLUDE(qt4_qhcp)
    242 SET(QTVERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}")
    243 
    244 FIND_PACKAGE(LibEngsas REQUIRED)
    245 IF(NOT LIBENGSAS_TESTING_FOUND)
    246         MESSAGE("Disabled BUILD_TESTING and BUILD_DEV because of missing LIBENGSAS_TESTING.")
    247         MESSAGE("  To fix this, install LibEngsas with INSTALL_LIBENGSAS_TESTING.")
    248         SET(BUILD_TESTING OFF)
    249         SET(BUILD_DEV OFF)
    250 ENDIF(NOT LIBENGSAS_TESTING_FOUND)
    251 
    252251IF(NOT EXISTS ${QT_QCOLLECTIONGENERATOR_EXECUTABLE})
    253252        IF(WITH_HANDBOOK)
     
    256255        ENDIF(WITH_HANDBOOK)
    257256ENDIF(NOT EXISTS ${QT_QCOLLECTIONGENERATOR_EXECUTABLE})
    258 IF(NOT WIN32)
    259         SET(LIB_INSTALL_DIR "/usr/lib/" CACHE STRING "Where to install the library files to")
    260 ENDIF(NOT WIN32)
    261257
    262258SET(PACK_HINTS ${QT_BINARY_DIR})
     
    303299MESSAGE("CONFIGURATION")
    304300MESSAGE("")
    305 MESSAGE("CMAKE_SHARED_LINKER_FLAGS: ${CMAKE_SHARED_LINKER_FLAGS}")
    306 MESSAGE("CMAKE_CXX_FLAGS:           ${CMAKE_CXX_FLAGS}")
    307 MESSAGE("CMAKE_INSTALL_PREFIX:      ${CMAKE_INSTALL_PREFIX}")
    308 MESSAGE("CMAKE_INSTALL_LIBDIR:      ${CMAKE_INSTALL_LIBDIR}")
     301MESSAGE("CMAKE_SHARED_LINKER_FLAGS:               ${CMAKE_SHARED_LINKER_FLAGS}")
     302MESSAGE("CMAKE_CXX_FLAGS:                         ${CMAKE_CXX_FLAGS}")
     303MESSAGE("INSTALL PATHS")
     304MESSAGE("  (Relative paths are prepended with CMAKE_INSTALL_PREFIX)")
     305MESSAGE("  CMAKE_INSTALL_PREFIX:                  ${CMAKE_INSTALL_PREFIX}")
     306MESSAGE("  BINARIES:                              ${bin_DIR}")
     307MESSAGE("  LIBRARIES:                             ${LIB_INSTALL_DIR}")
     308MESSAGE("  MEGANIZER_PLUGINS:                     ${PLUGINDIR}")
     309MESSAGE("  ENGSAS_EPARTS:                         ${LIBENGSAS_EPART_DIR}")
     310MESSAGE("  DESIGNER_PLUGIN:                       ${designer_DIR}")
     311MESSAGE("  FIND_CMAKE:                            ${find_cmake_DIR}")
     312MESSAGE("  PKGCONFIGS:                            ${pkgconfig_DIR}")
     313MESSAGE("  HEADER:                                ${include_DIR}")
     314MESSAGE("  MANPAGES:                              ${man_DIR}")
     315MESSAGE("  SHARE:                                 ${share_DIR}")
     316MESSAGE("  TRANSLATIONS:                          ${qm_DIR}")
     317MESSAGE("  DOCUMENTATION:                         ${DOCDIR}")
     318MESSAGE("  RESSOURCES:                            ${rcc_DIR}")
     319MESSAGE("  DEPENDENCIES:                          ${depends_DIR}")
    309320MESSAGE("")
    310321MESSAGE("OPTIONS:")
  • branches/0.5/cmake/modules/FindQCA2.cmake

    r353 r534  
    1111# in the FIND_PATH() and FIND_LIBRARY() calls
    1212
    13 # Changed 2010, Joachim Langenbach, <joachim.langenbach@engsas.de>
     13# Changed 2010 - 2015, Joachim Langenbach, <joachim.langenbach@engsas.de>
    1414#   - added QCA2_LIBRARY_DIR
    1515#   - commented out mark_as_advanced
     
    2020
    2121IF (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES)
    22 
    23   # in cache already
    24   SET(QCA2_FOUND TRUE)
    25 
    26 ELSE (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES)
    27 
    28 
    29   IF (WIN32)
    30                 FIND_PATH(QCA2_LIBRARY_DIR
    31                                                         WIN32_DEBUG_POSTFIX d
    32                                                         NAMES "bin/qcatool2.exe"
    33               HINTS "C:/Programme/"
    34                                                         PATH_SUFFIXES QCA
    35               )
    36                 FIND_LIBRARY(QCA2_LIBRARIES NAMES qca HINTS ${QCA2_LIBRARY_DIR}/bin)
     22        # in cache already
     23        SET(QCA2_FOUND TRUE)
     24ELSE ()
     25        IF (WIN32)
     26                FIND_LIBRARY(QCA2_LIBRARIES NAMES qca HINTS QCA/bin QCA bin)
     27                GET_FILENAME_COMPONENT(QCA2_LIBRARY_DIR ${QCA2_LIBRARIES} DIRECTORY)
     28                GET_FILENAME_COMPONENT(QCA2_LIBRARY_DIR ${QCA2_LIBRARY_DIR} DIRECTORY)
    3729                FIND_PATH(QCA2_INCLUDE_DIR NAMES qca.h HINTS ${QCA2_LIBRARY_DIR} PATH_SUFFIXES include/QtCrypto)
    3830        ELSE(WIN32)
    39     FIND_PACKAGE(PkgConfig)
    40 #     pkg_check_modules(PC_QCA2 QUIET qca2)
    41     pkg_check_modules(PC_QCA2 qca2)
    42     SET(QCA2_DEFINITIONS ${PC_QCA2_CFLAGS_OTHER})
     31                FIND_PACKAGE(PkgConfig)
     32                #     pkg_check_modules(PC_QCA2 QUIET qca2)
     33                pkg_check_modules(PC_QCA2 qca2)
     34                SET(QCA2_DEFINITIONS ${PC_QCA2_CFLAGS_OTHER})
    4335                FIND_LIBRARY(QCA2_LIBRARIES
    44                   WIN32_DEBUG_POSTFIX d
    45                   NAMES qca
    46                   HINTS ${PC_QCA2_LIBDIR} ${PC_QCA2_LIBRARY_DIRS}
    47                   )
     36                        WIN32_DEBUG_POSTFIX d
     37                        NAMES qca
     38                        HINTS ${PC_QCA2_LIBDIR} ${PC_QCA2_LIBRARY_DIRS}
     39                )
    4840                FIND_PATH(QCA2_INCLUDE_DIR QtCrypto
    49                 HINTS ${PC_QCA2_INCLUDEDIR} ${PC_QCA2_INCLUDE_DIRS}
    50                 PATH_SUFFIXES QtCrypto)
     41                        HINTS ${PC_QCA2_INCLUDEDIR} ${PC_QCA2_INCLUDE_DIRS}
     42                        PATH_SUFFIXES QtCrypto
     43                )
    5144  ENDIF (WIN32)
    5245
     
    5649# mark_as_advanced(QCA2_INCLUDE_DIR QCA2_LIBRARIES)
    5750
    58 ENDIF (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES)
     51ENDIF ()
Note: See TracChangeset for help on using the changeset viewer.