Changeset 91 in pacpusframework for trunk/cmake


Ignore:
Timestamp:
05/19/13 12:32:48 (11 years ago)
Author:
DHERBOMEZ Gérald
Message:

Improvement of the build system to avoid some workarounds

Location:
trunk/cmake
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/cmake/FindPacpus.cmake

    r80 r91  
    1414    if(NOT ENV{PACPUS_ROOT} STREQUAL "")
    1515        set(PACPUS_ROOT $ENV{PACPUS_ROOT})
    16         message(STATUS "Detected PACPUS_ROOT, set to '${PACPUS_ROOT}'")
     16        message(STATUS "Detected PACPUS_ROOT in environment, set to '${PACPUS_ROOT}'")
    1717    else()
    1818      if(PACPUS_FIND_REQUIRED)
    19         MESSAGE(FATAL_ERROR "Could'not find PACPUS_ROOT ")
     19                MESSAGE(FATAL_ERROR "Could'not find PACPUS_ROOT ")
    2020      else()
    21         MESSAGE(STATUS "Could'not find PACPUS_ROOT ")
    22         return()
     21                MESSAGE(STATUS "Could'not find PACPUS_ROOT ")
     22                return()
    2323      endif()
    2424    endif()
     25else()
     26        message(STATUS "Detected PACPUS_ROOT as argument with the path: '${PACPUS_ROOT}'")
    2527endif()
    2628
     
    8890    #set(CMAKE_INSTALL_PREFIX ${PACPUS_ROOT})
    8991    set(PACPUS_INSTALL_DIR ${PACPUS_ROOT})
    90     set(PACPUS_LIB_DIR "${PACPUS_ROOT}/lib"
    91 )
     92    set(PACPUS_LIB_DIR "${PACPUS_ROOT}/lib")
    9293    MESSAGE(STATUS "PACPUS_ROOT found ${PACPUS_ROOT}")
    9394
  • trunk/cmake/Findlog4cxx.cmake

    r85 r91  
    1414include(FindPackageHandleStandardArgs)
    1515
    16 IF(IS_BUILDING_PACPUS)
    17         MESSAGE(AUTHOR_WARNING "Find log4cxx should use the folder inside pacpusframework to set include and library directories and not the environment variable LOG4CXX_ROOT")
    18 ENDIF(IS_BUILDING_PACPUS)
     16# For Windows, when building Pacpus use the local log4cxx files, else use the log4cxx files in the pacpus install dir
     17if(WIN32)
     18        if(IS_BUILDING_PACPUS)
     19                SET(LOG4CXX_ROOT "3rd/apache-log4cxx")
     20        elseif(PACPUS_ROOT)
     21                SET(LOG4CXX_ROOT "${PACPUS_ROOT}/3rd/apache-log4cxx")
     22        else()
     23                SET(LOG4CXX_ROOT "$ENV{PACPUS_ROOT}/3rd/apache-log4cxx")
     24        endif()
     25endif()
    1926
    20 # See if LOG4CXX_ROOT is not already set in CMake
    21 if(NOT LOG4CXX_ROOT)
    22     # See if LOG4CXX_ROOT is set in process environment
    23     if( NOT $ENV{LOG4CXX_ROOT} STREQUAL "" )
    24         SET(LOG4CXX_ROOT "$ENV{LOG4CXX_ROOT}")
    25         MESSAGE(STATUS "Detected LOG4CXX_ROOT set to '${LOG4CXX_ROOT}'")
    26     endif()
    27 endif()
     27
    2828
    2929set(LOG4CXX_INC_LIST
     
    9090
    9191# Output variables
    92 set(LOG4CXX_LIBRARIES "")
    9392if(LOG4CXX_FOUND)
    9493    # Include dirs
  • trunk/cmake/PacpusConfiguration.cmake

    r64 r91  
    1111# Build-specific configuration
    1212# ========================================
     13
     14# TODO : check how cache variables work? Why the commented line doesn't work?
     15
    1316if(IS_BUILDING_PACPUS)
    14     set(PACPUS_INSTALL_DIR    ${CMAKE_INSTALL_PREFIX}   CACHE FILEPATH "Installation directory for the library")
     17        if(PACPUS_INSTALL_WITH_VERSION_NUMBER)
     18                pacpus_purge_backslash(PACPUS_INSTALL_DIR)
     19                set(PACPUS_INSTALL_DIR ${PACPUS_INSTALL_DIR}/${PACPUS_VERSION})
     20#       set(PACPUS_INSTALL_DIR    ${CMAKE_INSTALL_PREFIX}/${PACPUS_VERSION}   CACHE PATH "Installation directory for the library")
     21        endif()
    1522    set(PACPUS_INSTALL_3RD    FALSE                     CACHE BOOL      "Installation of the 3rd party")
    1623endif()
     24
    1725
    1826# ========================================
     
    2028# ========================================
    2129set(PACPUS_USE_LOG      TRUE  CACHE BOOL "Logging using log4cxx, the library is required")
    22 set(PACPUS_INSTALL_3RD  FALSE CACHE BOOL "Installation of the 3rd party")
     30if(win32)
     31        set(PACPUS_INSTALL_3RD  TRUE CACHE BOOL "Installation of the 3rd party")
     32else()
     33        set(PACPUS_INSTALL_3RD  FALSE CACHE BOOL "Installation of the 3rd party")
     34endif()
    2335set(PACPUS_BUILD_DOC    FALSE CACHE BOOL "Whether build the documentation - requires Doxygen")
    2436set(PACPUS_USE_SOLUTION_FOLDERS  FALSE CACHE BOOL "Use solution folders to classify projects, works in MS Visual Studio")
  • trunk/cmake/PacpusInstall.cmake

    r64 r91  
    3232# ========================================
    3333if(PACPUS_INSTALL_3RD)
    34     install(
    35     DIRECTORY
    36         ${PACPUS_3RD_PARTY_DIR}
    37     DESTINATION
    38         ${PACPUS_INSTALL_DIR}
    39     )
     34        if(WIN32)
     35                install(
     36                DIRECTORY
     37                        ${PACPUS_3RD_PARTY_DIR}
     38                DESTINATION
     39                        ${PACPUS_INSTALL_DIR}
     40                        )
     41        endif()
    4042endif()
    4143
Note: See TracChangeset for help on using the changeset viewer.